mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
clean subscriptions handling and avoid function_clause
This commit is contained in:
parent
1b8876bf55
commit
63b2d21b13
@ -1302,7 +1302,8 @@ remove_user(User, Server) ->
|
||||
[NodeId,
|
||||
Entity,
|
||||
JID,
|
||||
all])
|
||||
all]);
|
||||
(_) -> ok
|
||||
end,
|
||||
Subscriptions),
|
||||
{result, Affiliations} =
|
||||
|
@ -952,7 +952,8 @@ remove_user(User, Server) ->
|
||||
[NodeId,
|
||||
Entity,
|
||||
JID,
|
||||
all])
|
||||
all]);
|
||||
(_) -> ok
|
||||
end,
|
||||
Subscriptions),
|
||||
{result, Affiliations} =
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user