|
|
| Author |
Message |
|
| Guest |
Posted: Fri Jul 16, 2010 10:24 am |
|
|
|
Guest
|
Hi,
I asked a question about ejabberd's ability to send message stanzas to
all of a users resources, and have found some info in the RFC which
explains the behaviour contrary to this:
http://xmpp.org/rfcs/rfc3921.html#rfc.section.4.1
But some other XMPP servers provide a "sync" mode where this behaviour
will be the case. Is there such a thing in ejabberd?
My clients are send messages to user@domain, but when this gets routed
by ejabberd it sticks on the resource so the receiver gets the message
*from* user@domain/resource. I need it to not do this and maintain
the message is from user@domain
Cheers,
rod.
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Fri Jul 16, 2010 5:30 pm |
|
|
|
Guest
|
On Fri, 16 Jul 2010 11:24:17 +0100
rod <rod@pu-gh.com> wrote:
> I asked a question about ejabberd's ability to send message stanzas to
> all of a users resources, and have found some info in the RFC which
> explains the behaviour contrary to this:
>
> http://xmpp.org/rfcs/rfc3921.html#rfc.section.4.1
>
> But some other XMPP servers provide a "sync" mode where this behaviour
> will be the case. Is there such a thing in ejabberd?
>
> My clients are send messages to user@domain, but when this gets routed
> by ejabberd it sticks on the resource so the receiver gets the message
> *from* user@domain/resource. I need it to not do this and maintain
> the message is from user@domain
I think you are missing the point of the behaviour specified by the RFC
and hence trying to solve the wrong problem.
The chief issue here, which you seem to ignore, is that no sensible
receiver is able to chat from *all its connected resources at once*,
and here's why: even if the receiver's server would deliver the sender's
messages to all the receiver's resources, ignoring their priorities, the
receiver would only be able to send its replies from only one of
its resources at a time, and this means it would not have the same
conversation context on all the resources. Note that this is one-to-one
type of conversation, and "the one" here means one resource.
In your case, I think the best method to solve the problem is to prevent
the user from opening multiple sessions for the same account in the same
browser: just make all of them bind to the same resource (inferred
from a stored cookie or whatnot) and then any misguided attempt to open
another instance of the chat client will disconnect the existing
session, if it exists.
On the other hand, if your chat client is "browser-global" (that is,
any instance opened in a tab "knows" about all the other instances
already opened in the same browser), make it detect if a session for
the account the user is trying to use is already active and present the
user appropriate explanations and a question about if she's really sure.
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Fri Jul 16, 2010 7:18 pm |
|
|
|
Guest
|
2010/7/16 rod <rod@pu-gh.com>:
> I asked a question about ejabberd's ability to send message stanzas to
> all of a users resources, and have found some info in the RFC which
> explains the behaviour contrary to this:
>
> http://xmpp.org/rfcs/rfc3921.html#rfc.section.4.1
I found a section more relevant to your topic:
http://xmpp.org/rfcs/rfc3921.html#rfc.section.11.1
> if the JID is of the form <user@domain>
> and there is at least one available resource available for the user, [...]
> 1. For message stanzas, the server
> SHOULD deliver the stanza to the highest-priority available resource
> [...] or MAY deliver the message to all such resources.
As you can see, the protocol gives two alternatives,
and ejabberd implements the SHOULD, not the MAY.
> Is there such a thing in ejabberd?
I didn't find any related ticket or patch for that.
You could modify ejabberd source code to implement the MAY alternative,
and then also make it configurable.
---
Badlop
ProcessOne
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Sat Jul 17, 2010 7:15 am |
|
|
|
Guest
|
Hi.
Thanks for your replies, I think altering the server behaviour is
something I may need to look at doing.
At the moment my workaround is to use particular clients that (i
assume without reading the logs) reply to messages *without*
specifying the resource (eg. JabberFoX), but other clients do specify
the resource (eg. iChat).
Cheers!
rod.
On 16 July 2010 20:17, Badlop <badlop@gmail.com> wrote:
> 2010/7/16 rod <rod@pu-gh.com>:
>> I asked a question about ejabberd's ability to send message stanzas to
>> all of a users resources, and have found some info in the RFC which
>> explains the behaviour contrary to this:
>>
>> http://xmpp.org/rfcs/rfc3921.html#rfc.section.4.1
>
> I found a section more relevant to your topic:
>
> http://xmpp.org/rfcs/rfc3921.html#rfc.section.11.1
>
>> if the JID is of the form <user@domain>
>> and there is at least one available resource available for the user, [...]
>> 1. For message stanzas, the server
>> SHOULD deliver the stanza to the highest-priority available resource
>> [...] or MAY deliver the message to all such resources.
>
> As you can see, the protocol gives two alternatives,
> and ejabberd implements the SHOULD, not the MAY.
>
>
>> Is there such a thing in ejabberd?
>
> I didn't find any related ticket or patch for that.
>
> You could modify ejabberd source code to implement the MAY alternative,
> and then also make it configurable.
>
>
> ---
> Badlop
> ProcessOne
> _______________________________________________
> ejabberd mailing list
> ejabberd@jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|