redsolution / xabber-android

Open-source XMPP client for Android
http://xabber.com
Other
1.82k stars 815 forks source link

Xabber displays empty messages in OTR sessions with Pidgin (or libotr based?) clients #402

Open aelmahmoudy opened 9 years ago

aelmahmoudy commented 9 years ago

When a Xabber user sends an encrypted message to a Pidgin user, the pidgin client then seems to send some response (maybe an acknowledgement?) that Xabber parses as an empty text and displays it as such in the chat view. This happens if the OTR session is initiated by Xabber.

Actually, this also happens when the pidgin user ends the OTR session (or quits) regardless of which client initiated the OTR session.

Screenshot: empty_msg

Here's the relevant logcat:

I/com.xabber.android.ui.ChatViewerFragment$5@41c96510( 3367): afterTextChanged
I/System.out( 3367): 07:32:44 AM SENT (1105262824): <message id="mbiHF-32" to="pidginuser@rows.io/5ca25f0f-bd35-4029-8485-4092984f0662" type="chat"><composing xmlns="http://jabber.org/protocol/chatstates" /></message>
I/com.xabber.android.ui.ChatViewerFragment$5@41c96510( 3367): afterTextChanged
I/System.out( 3367): 07:32:45 AM SENT (1105262824): <message id="mbiHF-33" to="pidginuser@rows.io/5ca25f0f-bd35-4029-8485-4092984f0662" type="chat"><body>?OTR:AAMDCoCusznU/+cAAAAAAgAAAAMAAADAMUq3HnN7K/HTfE+6zNA6un1jX/ALhboIbfbotAoyL2HpWgxkI3upl4v2LsjPsLITHu8oUvnV7RVczTyMjBO751x8c8Xo330IeB/Gogv6ulAx5rnrsW5OJOCxkmMTVuQHVQECTYofeQS4rzr06kzqaXdTttbj3IZ0QH9sZL4qKVkrUEItHrnPZQ6LSygMJg551cC2EAUpL2hoFPcuXZZ8BF3yU4XcK0NxMR600khjBO3INM2/qi7+Bowgu/rkZJjiAAAAAAAAAAEAAAACAvWuC4WyJvXRw8qH/otgfyATkDsfmwAAABRtYZFxlIUrbcUswOxlrBmyTKtZCA==.</body><thread>z9Qd2j6EXjD7</thread><active xmlns="http://jabber.org/protocol/chatstates" /><request xmlns="urn:xmpp:receipts" /></message>
I/System.out( 3367): 07:32:46 AM RCV  (1105262824): <message id='purpled32c9fdd' type='chat' to='xabberuser@server.com' from='pidginuser@rows.io/5ca25f0f-bd35-4029-8485-4092984f0662'><active xmlns='http://jabber.org/protocol/chatstates'/><body>?OTR:AAMDOdT/5wqArrMBAAAAAwAAAAMAAADA7bJl/W+zFFEKvwqDfx0Y7zNA+GFvG4dnbMOxGvde1VOC2c30zYbI4hbMzpSc/dcP1WhssI823WQ7sjEPDwHq0JzzKqjI6PZ5WXpUjmUq0mo67UJJL2V9EH/TWFAPzcA7C2Fi2hnCCfL/5Y5e2GZ2YHQHuI74x8676GdRWkz+fcDdywbSLhpwvkREdT1e8CSM5N2Eikgq1q8q9SPX9DXV/6K/TsO/v4/OOwKKCaTaLU79AHHqiHAhnSbaNdrCaII0AAAAAAAAAAEAAAABBLwJOr53QfZ3e6Ivfr4I3d3didwcAAAAFAC/Ft7R+22pA5zYYbSO/ETMyChN.</body></message>
aelmahmoudy commented 9 years ago

I think had been fixed already in 6a51646be42039ef93bd346538bc60b3f9ba0a12

grigoryfedorov commented 9 years ago

@aelmahmoudy it was a temporary solution, I think. You still get empty notifications for these messages?