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>
|
||||
|
||||
* 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) ->
|
||||
case catch mnesia:dirty_index_read(roster, US, #roster.us) of
|
||||
Items when is_list(Items) ->
|
||||
Items ++ Acc;
|
||||
lists:filter(fun(#roster{subscription = none, ask = in}) ->
|
||||
false;
|
||||
(_) ->
|
||||
true
|
||||
end, Items) ++ Acc;
|
||||
_ ->
|
||||
Acc
|
||||
end.
|
||||
@ -450,8 +454,14 @@ process_subscription(Direction, User, Server, JID1, Type, Reason) ->
|
||||
end,
|
||||
case Push of
|
||||
{push, Item} ->
|
||||
if
|
||||
Item#roster.subscription == none,
|
||||
Item#roster.ask == in ->
|
||||
ok;
|
||||
true ->
|
||||
push_item(User, Server,
|
||||
jlib:make_jid("", Server, ""), Item),
|
||||
jlib:make_jid("", Server, ""), Item)
|
||||
end,
|
||||
true;
|
||||
none ->
|
||||
false
|
||||
|
@ -138,6 +138,9 @@ get_user_roster(Acc, {LUser, LServer}) ->
|
||||
case raw_to_record(LServer, I) of
|
||||
error ->
|
||||
[];
|
||||
#roster{subscription = none,
|
||||
ask = in} ->
|
||||
[];
|
||||
R ->
|
||||
SJID = jlib:jid_to_string(R#roster.jid),
|
||||
Groups = lists:flatmap(
|
||||
@ -488,8 +491,14 @@ process_subscription(Direction, User, Server, JID1, Type, Reason) ->
|
||||
end,
|
||||
case Push of
|
||||
{push, Item} ->
|
||||
if
|
||||
Item#roster.subscription == none,
|
||||
Item#roster.ask == in ->
|
||||
ok;
|
||||
true ->
|
||||
push_item(User, Server,
|
||||
jlib:make_jid("", Server, ""), Item),
|
||||
jlib:make_jid("", Server, ""), Item)
|
||||
end,
|
||||
true;
|
||||
none ->
|
||||
false
|
||||
|
Loading…
Reference in New Issue
Block a user