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,
|
[NodeId,
|
||||||
Entity,
|
Entity,
|
||||||
JID,
|
JID,
|
||||||
all])
|
all]);
|
||||||
|
(_) -> ok
|
||||||
end,
|
end,
|
||||||
Subscriptions),
|
Subscriptions),
|
||||||
{result, Affiliations} =
|
{result, Affiliations} =
|
||||||
|
@ -952,7 +952,8 @@ remove_user(User, Server) ->
|
|||||||
[NodeId,
|
[NodeId,
|
||||||
Entity,
|
Entity,
|
||||||
JID,
|
JID,
|
||||||
all])
|
all]);
|
||||||
|
(_) -> ok
|
||||||
end,
|
end,
|
||||||
Subscriptions),
|
Subscriptions),
|
||||||
{result, Affiliations} =
|
{result, Affiliations} =
|
||||||
|
@ -788,15 +788,8 @@ get_entity_subscriptions(Host, Owner) ->
|
|||||||
case decode_subscriptions(S) of
|
case decode_subscriptions(S) of
|
||||||
[] -> [{Node, none, Jid} | Acc];
|
[] -> [{Node, none, Jid} | Acc];
|
||||||
Subs ->
|
Subs ->
|
||||||
lists:foldl(fun ({Sub, SubId},
|
lists:foldl(fun ({Sub, SubId}, Acc2) ->
|
||||||
Acc2) ->
|
[{Node, Sub, SubId, Jid} | Acc2]
|
||||||
[{Node, Sub,
|
|
||||||
SubId, Jid}
|
|
||||||
| Acc2];
|
|
||||||
(Sub, Acc2) ->
|
|
||||||
[{Node, Sub,
|
|
||||||
Jid}
|
|
||||||
| Acc2]
|
|
||||||
end,
|
end,
|
||||||
Acc, Subs)
|
Acc, Subs)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user