[hotfix] prevent app from crashing when resending messages after safety number retrust
TK-TODO: write a proper merge request when we are less pressed for time to get this out the door!
- SYMPTOM: when trying to send an attachment on a channel in which subscribers have recently reinstalled signal, signald crashes with a deserialization error
- CAUSE: the
request
message provided by signald is similarly hybrid-formatted as the one we receive on rate limiting errors (the data envelop looks like an inbound message, but the attachments look like an outbound message). however, unlike in the rate limit error retry logic, we were failing to properly convert theserequest
fields before attempting a resend. thus, when signald tried to resend, it hit an object instead of a string when trying to deserialize theattachment.preview
field and crashed - FIX: add new parse logic to properly convert either inbound messages or these hybrid retry request messages into a proper
OutBoundMessage
Edited by aguestuser