psi-im / psi

XMPP client
https://psi-im.org/
Other
402 stars 123 forks source link

Psi sends BoB (XEP-0231) requests to a bare JID instead of proper resource #386

Open dos1 opened 6 years ago

dos1 commented 6 years ago

A request for BoB data should be sent to a resource that sent the message referencing it - however, Psi sends it to the bare JID, which, at least with ejabberd, won't work.

Test case: stickers sent from Movim.

Ri0n commented 5 years ago

Just tested. Seems to work properly. Sent a message with bob to a contact. The opened chat requested bob back from the resource. Even so I think it's possible to have requests from a wrong resource of without reseource at all depending on chat dialog settings. Because we determine the other party as a dialog's jid but not as jid of incoming message.

Since theoretically a message might be rendered much later then it was received, without keeping jid/resource of original message we definitely can't request bob properly.

Moreover the original resource may go offline and come back with different random-generate resource.

I see two possible solutions here.

  1. Prefetch all bobs immediately.
  2. Modify src uris to include source resource information.
Neustradamus commented 4 months ago

@dos1: The current situation is same?

Linked to XEP-0231: Bits of Binary: