tigase / siskin-im

(M) Public Project of Tigase Messenger for iOS devices based on Tigase Swift XMPP library.
GNU General Public License v3.0
173 stars 37 forks source link

Cannot send OMEMO encrypted message when using ejabberd xmpp server (while can receive them). #162

Open epi61 opened 2 years ago

epi61 commented 2 years ago

Describe the bug Exact same problem as: https://github.com/tigase/siskin-im/issues/137 Except that the other device is Android device that uses Conversations client. Conversations can send to Siskin Omemo encrypted message, but Siskin cannot send Omemo encrypted message to Conversations and gets "There is no trusted device to send message to". Omemo keys are exchanged and trusted. With a user using other server everything works as expected.

The server used is ejabberd with PostgreSQL.

To Reproduce Steps to reproduce the behavior:

  1. Add contact from the same ejabberd xmpp server.
  2. Open dialog
  3. Send an OMEMO encrypted message
  4. See "There is no trusted device to send message to"

Expected behavior An encrypted message should be sent as expected.

Details (please complete the following information):

Additional context

hantu85 commented 2 years ago

If SIskin is not able to send a message and returns There is no trusted device to send message to it means that there were no OMEMO device ids published by the recipient or it was not able to fetch them (incorrect PEP/PubSub nodes permissions).

My guess is that contacts are added but availability and status sharing are not enabled (presence subscription of type both), which could limit who can fetch OMEMO device ids published by the client.

Omemo keys are exchanged and trusted.

You are correct, but they are trusted and exchanged only in 1-way. Conversations fetched and trusted OMEMO keys published by Siskin, but Siskin was unable to do so.