25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

* src/mod_roster.erl: Added workaround for legacy gateways

(passing of "subscribed" presence)

* src/ejabberd_sm.erl: Minor fix in subscription processing

SVN Revision: 187
This commit is contained in:
Alexey Shchepin 2003-12-21 18:16:08 +00:00
parent b3b09bcfd8
commit 6706bdc696
3 changed files with 15 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2003-12-21 Alexey Shchepin <alexey@sevcom.net>
* src/mod_roster.erl: Added workaround for legacy gateways
(passing of "subscribed" presence)
* src/ejabberd_sm.erl: Minor fix in subscription processing
2003-12-17 Alexey Shchepin <alexey@sevcom.net>
* src/jlib.hrl: Added declaration of "iq" record

View File

@ -150,27 +150,26 @@ do_route(From, To, Packet) ->
"" ->
case Name of
"presence" ->
FromU = jlib:jid_replace_resource(From, ""),
{Pass, Subsc} =
case xml:get_attr_s("type", Attrs) of
"subscribe" ->
{mod_roster:in_subscription(User,
FromU,
From,
subscribe),
true};
"subscribed" ->
{mod_roster:in_subscription(User,
FromU,
From,
subscribed),
true};
"unsubscribe" ->
{mod_roster:in_subscription(User,
FromU,
From,
unsubscribe),
true};
"unsubscribed" ->
{mod_roster:in_subscription(User,
FromU,
From,
unsubscribed),
true};
_ ->

View File

@ -397,7 +397,8 @@ process_subscription(Direction, User, JID1, Type) ->
%% NewState = none | {NewSubscription, NewPending}
in_state_change(none, none, subscribe) -> {none, in};
in_state_change(none, none, subscribed) -> none;
in_state_change(none, none, subscribed) -> {to, none}; % Workaround for gateways
%in_state_change(none, none, subscribed) -> none;
in_state_change(none, none, unsubscribe) -> none;
in_state_change(none, none, unsubscribed) -> none;
in_state_change(none, out, subscribe) -> {none, both};
@ -405,7 +406,8 @@ in_state_change(none, out, subscribed) -> {to, none};
in_state_change(none, out, unsubscribe) -> none;
in_state_change(none, out, unsubscribed) -> {none, none};
in_state_change(none, in, subscribe) -> none;
in_state_change(none, in, subscribed) -> none;
in_state_change(none, in, subscribed) -> {to, in}; % Workaround for gateways
%in_state_change(none, in, subscribed) -> none;
in_state_change(none, in, unsubscribe) -> {none, none};
in_state_change(none, in, unsubscribed) -> none;
in_state_change(none, both, subscribe) -> none;