summaryrefslogtreecommitdiff
path: root/src/mod_multicast.erl
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2017-06-26 11:26:53 +0200
committerBadlop <badlop@process-one.net>2017-06-26 11:26:53 +0200
commit05346780283b02f459f539bd63a45879a5f7cc5b (patch)
tree27ec23f769e845b07ce57f2f331725890e3a6873 /src/mod_multicast.erl
parentCatch exception that may happen when sending data over websocket (diff)
Use YAML syntax for limits option in mod_multicast
Diffstat (limited to 'src/mod_multicast.erl')
-rw-r--r--src/mod_multicast.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mod_multicast.erl b/src/mod_multicast.erl
index d2627c25..f27003f7 100644
--- a/src/mod_multicast.erl
+++ b/src/mod_multicast.erl
@@ -998,9 +998,8 @@ build_service_limit_record(LimitOpts) ->
build_limit_record(LimitOptsR, remote)}.
get_from_limitopts(LimitOpts, SenderT) ->
- [{StanzaT, Number}
- || {SenderT2, StanzaT, Number} <- LimitOpts,
- SenderT =:= SenderT2].
+ {SenderT, Result} = lists:keyfind(SenderT, 1, LimitOpts),
+ Result.
build_remote_limit_record(LimitOpts, SenderT) ->
build_limit_record(LimitOpts, SenderT).