mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
* src/mod_roster_odbc.erl: Don't deliver roster items in "None +
Pending In" state * src/mod_roster.erl: Likewise SVN Revision: 752
This commit is contained in:
parent
fa6b6b8f5a
commit
1e5a9d9f43
@ -1,3 +1,9 @@
|
|||||||
|
2007-04-26 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
|
* src/mod_roster_odbc.erl: Don't deliver roster items in "None +
|
||||||
|
Pending In" state
|
||||||
|
* src/mod_roster.erl: Likewise
|
||||||
|
|
||||||
2007-04-12 Alexey Shchepin <alexey@sevcom.net>
|
2007-04-12 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
* src/ejabberd_socket.erl: Added API for monitoring socket
|
* src/ejabberd_socket.erl: Added API for monitoring socket
|
||||||
|
@ -129,7 +129,11 @@ process_iq_get(From, To, #iq{sub_el = SubEl} = IQ) ->
|
|||||||
get_user_roster(Acc, US) ->
|
get_user_roster(Acc, US) ->
|
||||||
case catch mnesia:dirty_index_read(roster, US, #roster.us) of
|
case catch mnesia:dirty_index_read(roster, US, #roster.us) of
|
||||||
Items when is_list(Items) ->
|
Items when is_list(Items) ->
|
||||||
Items ++ Acc;
|
lists:filter(fun(#roster{subscription = none, ask = in}) ->
|
||||||
|
false;
|
||||||
|
(_) ->
|
||||||
|
true
|
||||||
|
end, Items) ++ Acc;
|
||||||
_ ->
|
_ ->
|
||||||
Acc
|
Acc
|
||||||
end.
|
end.
|
||||||
@ -450,8 +454,14 @@ process_subscription(Direction, User, Server, JID1, Type, Reason) ->
|
|||||||
end,
|
end,
|
||||||
case Push of
|
case Push of
|
||||||
{push, Item} ->
|
{push, Item} ->
|
||||||
push_item(User, Server,
|
if
|
||||||
jlib:make_jid("", Server, ""), Item),
|
Item#roster.subscription == none,
|
||||||
|
Item#roster.ask == in ->
|
||||||
|
ok;
|
||||||
|
true ->
|
||||||
|
push_item(User, Server,
|
||||||
|
jlib:make_jid("", Server, ""), Item)
|
||||||
|
end,
|
||||||
true;
|
true;
|
||||||
none ->
|
none ->
|
||||||
false
|
false
|
||||||
|
@ -138,6 +138,9 @@ get_user_roster(Acc, {LUser, LServer}) ->
|
|||||||
case raw_to_record(LServer, I) of
|
case raw_to_record(LServer, I) of
|
||||||
error ->
|
error ->
|
||||||
[];
|
[];
|
||||||
|
#roster{subscription = none,
|
||||||
|
ask = in} ->
|
||||||
|
[];
|
||||||
R ->
|
R ->
|
||||||
SJID = jlib:jid_to_string(R#roster.jid),
|
SJID = jlib:jid_to_string(R#roster.jid),
|
||||||
Groups = lists:flatmap(
|
Groups = lists:flatmap(
|
||||||
@ -488,8 +491,14 @@ process_subscription(Direction, User, Server, JID1, Type, Reason) ->
|
|||||||
end,
|
end,
|
||||||
case Push of
|
case Push of
|
||||||
{push, Item} ->
|
{push, Item} ->
|
||||||
push_item(User, Server,
|
if
|
||||||
jlib:make_jid("", Server, ""), Item),
|
Item#roster.subscription == none,
|
||||||
|
Item#roster.ask == in ->
|
||||||
|
ok;
|
||||||
|
true ->
|
||||||
|
push_item(User, Server,
|
||||||
|
jlib:make_jid("", Server, ""), Item)
|
||||||
|
end,
|
||||||
true;
|
true;
|
||||||
none ->
|
none ->
|
||||||
false
|
false
|
||||||
|
Loading…
Reference in New Issue
Block a user