hoccer / hoccer-talk-spike

Android Client & Backend Software
0 stars 0 forks source link

Android client sends bad attachment w/o remoteURL and attachmentFileId #1090

Closed pavel-mayer closed 8 years ago

pavel-mayer commented 8 years ago

Sometimes Android clients send out messages with attachments, but there is

There is probably due to a race condition somewhere so that a message with attachment is sent without waiting for the uploadUrl, downloadUrl and fileId returned from the server.

Maybe this is related to issue #1089, although it also occurs sometimes when the client is online.

Note that the server sets attachmentDeliveryState to "none" because there is no attachmentFileId; this avoid at least that the server is cluttered with messages without fileid; however, this causes the sender to assume the message was sent and received properly by the receiver; I will change the server code to reject such messages (where there is an attachment but no attachmentFileId, or the delivery indicates an attachment, but no file id or attachment) with an error in the near future.