| Author |
Message |
|
| Guest |
Posted: Thu Mar 08, 2007 7:09 pm |
|
|
|
Guest
|
There is a problem on the way ejabberd manages subscriptions, and it doesn't seems like it's really RFC3921 compliant, so I'd catalog it as a bug. I tested this behavior with other jabber flavors and I couldn't recreate ejabberd's.
When I add a buddy, it gets added in both, my roster and his roster, with subscription none. Even if I haven't accepted him or even if I declined his request. While the correct behavior should be that the user gets added after I accepted him.
Is there a reason for this behavior, is there a way to fix this behavior?
I've been looking on the config files and I've googled this problem out for a while now, without any luck, I'd appreciate all the help/guidance you can provide me on this.
Thanks
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Fri Mar 09, 2007 12:09 am |
|
|
|
Guest
|
This is the fix for the problem described on my first email.
mod_roster.erl
Current Code:
-ifdef(PSI_ROSTER_WORKAROUND).
process_iq(From, To, IQ) ->
#iq{sub_el = SubEl} = IQ,
#jid{lserver = LServer} = From,
case lists:member(LServer, ?MYHOSTS) of
true ->
ResIQ = process_local_iq(From, To, IQ),
ejabberd_router:route(From, From,
jlib:iq_to_xml(ResIQ)),
ignore;
_ ->
IQ#iq{type = error, sub_el = [SubEl, ?ERR_ITEM_NOT_FOUND]}
end.
-else.
CODE THAT FIX THE BEHAVIOR DESCRIBED IN THE LAST POST
-ifdef(PSI_ROSTER_WORKAROUND).
process_iq(From, To, IQ) ->
#iq{sub_el = SubEl} = IQ,
#jid{lserver = LServer} = From,
case lists:member(LServer, ?MYHOSTS) of
true ->
ResIQ = process_local_iq(From, To, IQ),
ejabberd_router:route(From, To,
jlib:iq_to_xml(ResIQ)),
ignore;
_ ->
IQ#iq{type = error, sub_el = [SubEl, ?ERR_ITEM_NOT_FOUND]}
end.
-else.
This might help someone in the future, I don't know if psi will behave correctly, but this will make it RFC compliant.
Cheers!
Jorge Guntanis
On 3/8/07, Jorge Guntanis <guntanis@gmail.com (guntanis@gmail.com)> wrote:Quote:
There is a problem on the way ejabberd manages subscriptions, and it doesn't seems like it's really RFC3921 compliant, so I'd catalog it as a bug. I tested this behavior with other jabber flavors and I couldn't recreate ejabberd's.
When I add a buddy, it gets added in both, my roster and his roster, with subscription none. Even if I haven't accepted him or even if I declined his request. While the correct behavior should be that the user gets added after I accepted him.
Is there a reason for this behavior, is there a way to fix this behavior?
I've been looking on the config files and I've googled this problem out for a while now, without any luck, I'd appreciate all the help/guidance you can provide me on this.
Thanks
Post recived 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
|
|
|