Software /
code /
prosody
Comparison
plugins/mod_carbons.lua @ 10785:e210afc9296a
mod_carbons: Don't copy messages that should not be copied
The return statements were lost in d95e083931d1
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 27 Apr 2020 14:43:54 +0200 |
parent | 10782:6b776f80b96e |
child | 10786:a1b633ba9bd9 |
comparison
equal
deleted
inserted
replaced
10784:0b0fe73199d2 | 10785:e210afc9296a |
---|---|
90 | 90 |
91 local should, why = should_copy(stanza, c2s, bare_jid); | 91 local should, why = should_copy(stanza, c2s, bare_jid); |
92 | 92 |
93 if not should then | 93 if not should then |
94 module:log("debug", "Not copying stanza: %s (%s)", stanza:top_tag(), why); | 94 module:log("debug", "Not copying stanza: %s (%s)", stanza:top_tag(), why); |
95 return; | |
95 elseif why == "private" and not c2s then | 96 elseif why == "private" and not c2s then |
96 stanza:maptags(function(tag) | 97 stanza:maptags(function(tag) |
97 if not ( tag.attr.xmlns == xmlns_carbons and tag.name == "private" ) then | 98 if not ( tag.attr.xmlns == xmlns_carbons and tag.name == "private" ) then |
98 return tag; | 99 return tag; |
99 end | 100 end |