Open DarkSideF opened 9 years ago
Hi, it does not sound too right although I am not sure what you mean with multisession exactly? What configuration is that? Then I will have to look into this issue further. As long as only one message get 'delivered' I would say that the module should store only one message too.
Cheers, Gregor
Speaking of multisession I mean user who logged from different devices or browsers with one jabber account. i.e. same bare JID with different resources
That make this possible in my ejabberd config i set resource_conflict: setresource
(http://www.process-one.net/docs/ejabberd/guide_en.html, 3.1.5 Authentication)
I also asked this question on StackOverflow: http://stackoverflow.com/questions/28093418/ejabberd-14-12-mod-mam-multisession-issue
I think this problem is resolved in fork for your module: https://github.com/sdcr/ejabberd-mod-mam/commit/d7be032bf8153d093bbd02dc2812c2e51a9a3cc2
As I understand it you should not use user_receive_packet
ejabberd hook because that save message after server route it to all user resources
Example:
I send message to bare JID, who have 3 online resources.
Server router send it to each JID resource and we have triple user_receive_packet
And module saves 3 messages, but i send only one
Was this ever solved? I am running ejabberd 15.07 and it behaves the same way.
I have configured ejabberd 14.12 server with enabled multisession and working mod_mam (XEP-0313 v0.2, https://github.com/kongo2002/ejabberd-mod-mam, http://xmpp.org/extensions/attic/xep-0313-0.2.html)
mod_mam works great when i send message from user with one connected session to different user with one session
However if user-1@example has 2 online sessions with different resources and user-2@example sends to user-1@example (to bare JID) one message - mod_mam saves two messages
ejabberd log:
We can see double 'handle_cast' from mod_mam.
When i querying messages from archive i got something like this:
But i want receive only one message without duplicate.
Similarly if user-1@example has 3 online sessions with different resources and user-2@example sends to user-1@example (to bare JID) one message - mod_mam saves two messages. ejabberd log:
Questions: