equal
deleted
inserted
replaced
120 self:_route_stanza(stanza); |
120 self:_route_stanza(stanza); |
121 end |
121 end |
122 end |
122 end |
123 function room_mt:broadcast_message(stanza, historic) |
123 function room_mt:broadcast_message(stanza, historic) |
124 local to = stanza.attr.to; |
124 local to = stanza.attr.to; |
|
125 local muc_jid = self.jid; |
|
126 |
|
127 stanza:maptags(function (child) |
|
128 if child.name == "delay" and child.attr["xmlns"] == "urn:xmpp:delay" then |
|
129 if child.attr["from"] == muc_jid then |
|
130 return nil; |
|
131 end |
|
132 end |
|
133 if child.name == "x" and child.attr["xmlns"] == "jabber:x:delay" then |
|
134 if child.attr["from"] == muc_jid then |
|
135 return nil; |
|
136 end |
|
137 end |
|
138 return child; |
|
139 end) |
|
140 |
125 for occupant, o_data in pairs(self._occupants) do |
141 for occupant, o_data in pairs(self._occupants) do |
126 for jid in pairs(o_data.sessions) do |
142 for jid in pairs(o_data.sessions) do |
127 stanza.attr.to = jid; |
143 stanza.attr.to = jid; |
128 self:_route_stanza(stanza); |
144 self:_route_stanza(stanza); |
129 end |
145 end |