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

clean subscriptions handling and avoid function_clause

This commit is contained in:
Christophe Romain 2013-08-27 14:23:52 +02:00
parent 1b8876bf55
commit 63b2d21b13
3 changed files with 6 additions and 11 deletions

View File

@ -1302,7 +1302,8 @@ remove_user(User, Server) ->
[NodeId,
Entity,
JID,
all])
all]);
(_) -> ok
end,
Subscriptions),
{result, Affiliations} =

View File

@ -952,7 +952,8 @@ remove_user(User, Server) ->
[NodeId,
Entity,
JID,
all])
all]);
(_) -> ok
end,
Subscriptions),
{result, Affiliations} =

View File

@ -788,15 +788,8 @@ get_entity_subscriptions(Host, Owner) ->
case decode_subscriptions(S) of
[] -> [{Node, none, Jid} | Acc];
Subs ->
lists:foldl(fun ({Sub, SubId},
Acc2) ->
[{Node, Sub,
SubId, Jid}
| Acc2];
(Sub, Acc2) ->
[{Node, Sub,
Jid}
| Acc2]
lists:foldl(fun ({Sub, SubId}, Acc2) ->
[{Node, Sub, SubId, Jid} | Acc2]
end,
Acc, Subs)
end