BUG: fingerprint updates fail due to missing socket id
stack trace:
20-10-22 13:28:06
TypeError: Cannot read property 'acquire' of undefined
2020-10-22 13:28:06
[dispatcher | 2020-10-22T17:28:06.833Z] Cannot read property 'acquire' of undefined
2020-10-22 13:23:52
at Object.updateFingerprint (/signalboost/app/registrar/safetyNumbers.js:18:12)
2020-10-22 13:23:52
at trustAndResend (/signalboost/app/registrar/safetyNumbers.js:29:36)
2020-10-22 13:23:52
at Object.trust (/signalboost/app/signal/index.js:231:33)
2020-10-22 13:23:52
at Object.write (/signalboost/app/socket/write.js:17:10)
2020-10-22 13:23:52
at new Promise (<anonymous>)
2020-10-22 13:23:52
at Promise (/signalboost/app/socket/write.js:19:8)
problem code:
- https://0xacab.org/team-friendo/signalboost/-/blob/main/app/registrar/safetyNumbers.js#L29
- this call to
trust
omits a socket id. - to get the correct socket id for thsi channel, we need to make a db call to retrieve the socket id based on the channel phone number.
- we can use
repositories.channel.getSocketId(channelPhoneNumber)
to do that!
Edited by aguestuser