Add support for Private Messages (#196)
Closed
wojciech.kapcia@tigase.net opened 5 years ago

Not sure if it would be wise (considering moving to MIX)/feasible (especially with current UI) but having support for 7.5 Sending a Private Message would be nice.

If not complete support with sending messages, at least marking them as private would be helpful (if we have two resources, and with one we send a private chat, in Beagle it's shown as send to the MUC room itself, which is a bit confusing at first)

Andrzej Wójcik (Tigase) commented 5 years ago

MIX also is supposed to have private messages, so some UI will need to be developed for that. I think that marking messages as "private" would be enough.

wojciech.kapcia@tigase.net commented 5 years ago

After some consideration (and usage) - having a two direction (i.e. possibility to reply via private message and not only receive them) would be helpful

wojciech.kapcia@tigase.net commented 5 years ago

I checked Version 4.0 (79) and the only indication of private/direct message is addition of "From nick@muc.domain". Private messages send from Beagle have in the header "To (private message)".

Andrzej Wójcik (Tigase) commented 5 years ago

Which client have you used for testing? I’ve used Conversations as Psi was not properly marking PM (according to the MUC XEP).

Andrzej Wójcik (Tigase) commented 5 years ago

Psi was not adding ‚x’ element and causing this issue.

Andrzej Wójcik (Tigase) commented 5 years ago

With proper PM sent from Psi comsole, everything was working fine.

wojciech.kapcia@tigase.net commented 5 years ago

I used Psi, but the specification, contrary to what you say, doesn't mandate presence of <x/>, Sending a Private Message says:

To allow for proper synchronization of these messages to the user's other clients by Message Carbons (XEP-0280) [19], the sending client SHOULD add an element qualified by the 'http://jabber.org/protocol/muc#user' namespace to the message. Note: because this requirement was only added in revision 1.28 of this XEP, receiving entities MUST NOT rely on the existence of the element on private messages for proper processing.

Andrzej Wójcik (Tigase) commented 5 years ago

Ok, so it is not possible to distinguish PM from normal 1-1 message on the client side if client is not joined to the MUC room. Yet, somehow everyone expects special parsing and treatment of does messages. Generally, I should say that this is not possible to be implemented properly as behavior will change depending on what you you client knows.

Andrzej Wójcik (Tigase) commented 5 years ago

I've made a few adjustments to reflect XEP more closely, so it may behave better, but I'm still pretty sure that there will be issues with this feature (as it is not possible to distinguish 1-1 message from PM message without knowledge that messages came from the MUC room).

New version at dropbox.

wojciech.kapcia@tigase.net commented 5 years ago

It indeed does works better.

issue 1 of 1
Type
Task
Priority
Normal
Assignee
Spent time
7h 30m
Issue Votes (0)
Watchers (0)
Reference
tigase/_clients/beagle-im#196
Please wait...
Page is in error, reload to recover