Mercurial > prosody-hg
comparison plugins/mod_mam/mod_mam.lua @ 8206:6de741ada3cd
mod_mam: Clone stanza before stripping stanza id after carbons
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 03 Sep 2017 12:42:25 +0200 |
| parents | bb0118e46c45 |
| children | 8ea0484871e8 |
comparison
equal
deleted
inserted
replaced
| 8205:0a3060592db8 | 8206:6de741ada3cd |
|---|---|
| 312 return message_handler(event, true); | 312 return message_handler(event, true); |
| 313 end | 313 end |
| 314 | 314 |
| 315 local function strip_stanza_id(event) | 315 local function strip_stanza_id(event) |
| 316 local strip_by = jid_bare(event.origin.full_jid); | 316 local strip_by = jid_bare(event.origin.full_jid); |
| 317 event.stanza = st.clone(event.stanza); | |
| 317 event.stanza:maptags(function(tag) | 318 event.stanza:maptags(function(tag) |
| 318 if not ( tag.attr.xmlns == xmlns_st_id and tag.attr.by == strip_by ) then | 319 if not ( tag.attr.xmlns == xmlns_st_id and tag.attr.by == strip_by ) then |
| 319 return tag; | 320 return tag; |
| 320 end | 321 end |
| 321 end); | 322 end); |
