mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
* src/mod_roster.erl: Removed the ancient Psi roster workaround
* src/mod_roster_odbc.erl: Likewise SVN Revision: 1189
This commit is contained in:
parent
0eb8aafc0d
commit
08a4392fa9
@ -1,3 +1,8 @@
|
||||
2008-02-14 Alexey Shchepin <alexey@process-one.net>
|
||||
|
||||
* src/mod_roster.erl: Removed the ancient Psi roster workaround
|
||||
* src/mod_roster_odbc.erl: Likewise
|
||||
|
||||
2008-02-12 Badlop <badlop@process-one.net>
|
||||
|
||||
* src/web/ejabberd_web_admin.erl: Fixed native support for all the
|
||||
|
@ -103,25 +103,6 @@ stop(Host) ->
|
||||
gen_iq_handler:remove_iq_handler(ejabberd_sm, Host, ?NS_ROSTER).
|
||||
|
||||
|
||||
-define(PSI_ROSTER_WORKAROUND, true).
|
||||
|
||||
-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.
|
||||
|
||||
process_iq(From, To, IQ) ->
|
||||
#iq{sub_el = SubEl} = IQ,
|
||||
#jid{lserver = LServer} = From,
|
||||
@ -132,8 +113,6 @@ process_iq(From, To, IQ) ->
|
||||
IQ#iq{type = error, sub_el = [SubEl, ?ERR_ITEM_NOT_FOUND]}
|
||||
end.
|
||||
|
||||
-endif.
|
||||
|
||||
process_local_iq(From, To, #iq{type = Type} = IQ) ->
|
||||
case Type of
|
||||
set ->
|
||||
@ -354,21 +333,6 @@ push_item(User, Server, From, Item) ->
|
||||
end, ejabberd_sm:get_user_resources(User, Server)).
|
||||
|
||||
% TODO: don't push to those who didn't load roster
|
||||
-ifdef(PSI_ROSTER_WORKAROUND).
|
||||
|
||||
push_item(User, Server, Resource, _From, Item) ->
|
||||
ResIQ = #iq{type = set, xmlns = ?NS_ROSTER,
|
||||
id = "push",
|
||||
sub_el = [{xmlelement, "query",
|
||||
[{"xmlns", ?NS_ROSTER}],
|
||||
[item_to_xml(Item)]}]},
|
||||
ejabberd_router:route(
|
||||
jlib:make_jid(User, Server, Resource),
|
||||
jlib:make_jid(User, Server, Resource),
|
||||
jlib:iq_to_xml(ResIQ)).
|
||||
|
||||
-else.
|
||||
|
||||
push_item(User, Server, Resource, From, Item) ->
|
||||
ResIQ = #iq{type = set, xmlns = ?NS_ROSTER,
|
||||
id = "push",
|
||||
@ -380,8 +344,6 @@ push_item(User, Server, Resource, From, Item) ->
|
||||
jlib:make_jid(User, Server, Resource),
|
||||
jlib:iq_to_xml(ResIQ)).
|
||||
|
||||
-endif.
|
||||
|
||||
get_subscription_lists(_, User, Server) ->
|
||||
LUser = jlib:nodeprep(User),
|
||||
LServer = jlib:nameprep(Server),
|
||||
|
@ -99,25 +99,6 @@ stop(Host) ->
|
||||
gen_iq_handler:remove_iq_handler(ejabberd_sm, Host, ?NS_ROSTER).
|
||||
|
||||
|
||||
-define(PSI_ROSTER_WORKAROUND, true).
|
||||
|
||||
-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.
|
||||
|
||||
process_iq(From, To, IQ) ->
|
||||
#iq{sub_el = SubEl} = IQ,
|
||||
#jid{lserver = LServer} = From,
|
||||
@ -128,8 +109,6 @@ process_iq(From, To, IQ) ->
|
||||
IQ#iq{type = error, sub_el = [SubEl, ?ERR_ITEM_NOT_FOUND]}
|
||||
end.
|
||||
|
||||
-endif.
|
||||
|
||||
process_local_iq(From, To, #iq{type = Type} = IQ) ->
|
||||
case Type of
|
||||
set ->
|
||||
@ -390,22 +369,7 @@ push_item(User, Server, From, Item) ->
|
||||
end, ejabberd_sm:get_user_resources(User, Server)).
|
||||
|
||||
% TODO: don't push to those who not load roster
|
||||
-ifdef(PSI_ROSTER_WORKAROUND).
|
||||
|
||||
push_item(User, Server, Resource, _From, Item) ->
|
||||
ResIQ = #iq{type = set, xmlns = ?NS_ROSTER,
|
||||
id = "push",
|
||||
sub_el = [{xmlelement, "query",
|
||||
[{"xmlns", ?NS_ROSTER}],
|
||||
[item_to_xml(Item)]}]},
|
||||
ejabberd_router:route(
|
||||
jlib:make_jid(User, Server, Resource),
|
||||
jlib:make_jid(User, Server, Resource),
|
||||
jlib:iq_to_xml(ResIQ)).
|
||||
|
||||
-else.
|
||||
|
||||
push_item(User, Resource, From, Item) ->
|
||||
push_item(User, Server, Resource, From, Item) ->
|
||||
ResIQ = #iq{type = set, xmlns = ?NS_ROSTER,
|
||||
id = "push",
|
||||
sub_el = [{xmlelement, "query",
|
||||
@ -416,8 +380,6 @@ push_item(User, Resource, From, Item) ->
|
||||
jlib:make_jid(User, Server, Resource),
|
||||
jlib:iq_to_xml(ResIQ)).
|
||||
|
||||
-endif.
|
||||
|
||||
get_subscription_lists(_, User, Server) ->
|
||||
LUser = jlib:nodeprep(User),
|
||||
LServer = jlib:nameprep(Server),
|
||||
|
Loading…
Reference in New Issue
Block a user