Mercurial > prosody-modules
comparison mod_mam_muc/mod_mam_muc.lua @ 2833:4f9466be7b46
mod_mam_muc: Add comment describing stripping of <x> tag in results
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 18 Nov 2017 00:47:44 +0100 |
parents | 15a9d508c5f7 |
children | b69ef062806e |
comparison
equal
deleted
inserted
replaced
2832:15a9d508c5f7 | 2833:4f9466be7b46 |
---|---|
250 local fwd_st = st.message(msg_reply_attr) | 250 local fwd_st = st.message(msg_reply_attr) |
251 :tag("result", { xmlns = xmlns_mam, queryid = qid, id = id }) | 251 :tag("result", { xmlns = xmlns_mam, queryid = qid, id = id }) |
252 :tag("forwarded", { xmlns = xmlns_forward }) | 252 :tag("forwarded", { xmlns = xmlns_forward }) |
253 :tag("delay", { xmlns = xmlns_delay, stamp = timestamp(when) }):up(); | 253 :tag("delay", { xmlns = xmlns_delay, stamp = timestamp(when) }):up(); |
254 | 254 |
255 -- Strip <x> tag, containing the original senders JID, unless the room makes this public | |
255 if room:get_whois() ~= "anyone" then | 256 if room:get_whois() ~= "anyone" then |
256 item:maptags(function (tag) | 257 item:maptags(function (tag) |
257 if tag.name == "x" and tag.attr.xmlns == xmlns_muc_user then | 258 if tag.name == "x" and tag.attr.xmlns == xmlns_muc_user then |
258 return nil; | 259 return nil; |
259 end | 260 end |