]> granicus.if.org Git - ejabberd/commitdiff
Include id in mucsub notification message
authorPaweł Chmielowski <pchmielowski@process-one.net>
Thu, 28 Mar 2019 13:43:22 +0000 (14:43 +0100)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Thu, 28 Mar 2019 13:43:28 +0000 (14:43 +0100)
src/mod_muc_room.erl

index a048272ca5962d7621807a5acc22b61f554f36e3..1627b8866a6b7528d3295d1f22f8f6db81fe7d24 100644 (file)
@@ -4435,13 +4435,15 @@ send_wrapped(From, To, Packet, Node, State) ->
 -spec wrap(jid(), jid(), stanza(), binary()) -> message().
 wrap(From, To, Packet, Node) ->
     El = xmpp:set_from_to(Packet, From, To),
+    Id = p1_rand:get_string(),
     #message{
-       sub_els = [#ps_event{
-                    items = #ps_items{
-                               node = Node,
-                               items = [#ps_item{
-                                           id = p1_rand:get_string(),
-                                           sub_els = [El]}]}}]}.
+       id = Id,
+       sub_els = [#ps_event{
+           items = #ps_items{
+               node = Node,
+               items = [#ps_item{
+                   id = Id,
+                   sub_els = [El]}]}}]}.
 
 -spec send_wrapped_multiple(jid(), map(), stanza(), binary(), state()) -> ok.
 send_wrapped_multiple(From, Users, Packet, Node, State) ->