mod_carbons: Reduce line count using new util.stanza attr method

This commit is contained in:
Kim Alvefur 2021-09-12 20:18:04 +02:00
parent 738ff2a5f9
commit 9ae27ec538

View file

@ -60,10 +60,8 @@ local function should_copy(stanza, c2s, user_bare) --> boolean, reason: string
return true, "jingle call"; return true, "jingle call";
end end
for archived in stanza:childtags("stanza-id", "urn:xmpp:sid:0") do if stanza:get_child_with_attr("stanza-id", "urn:xmpp:sid:0", "by", user_bare) then
if archived and archived.attr.by == user_bare then return true, "archived";
return true, "archived";
end
end end
return false, "default"; return false, "default";