# HG changeset patch # User tmolitor # Date 1587461203 -7200 # Node ID 9ec23a457f9ae7a826f123e8fb7a7980e7a6a7dd # Parent c3e9caa29857cad147845be3cf32c88963d7730c mod_smacks: remove now unused code diff -r c3e9caa29857 -r 9ec23a457f9a mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Mon Apr 20 15:30:56 2020 +0200 +++ b/mod_smacks/mod_smacks.lua Tue Apr 21 11:26:43 2020 +0200 @@ -420,6 +420,8 @@ end -- don't send delivery errors for messages which will be delivered by mam later on +-- check if stanza was archived --> this will allow us to send back errors for stanzas not archived +-- because the user configured the server to do so ("no-archive"-setting for one special contact for example) local function get_stanza_id(stanza, by_jid) for tag in stanza:childtags("stanza-id", "urn:xmpp:sid:0") do if tag.attr.by == by_jid then @@ -453,15 +455,6 @@ end end); --- mark stanzas as archived --> this will allow us to send back errors for stanzas not archived --- because the user configured the server to do so ("no-archive"-setting for one special contact for example) -module:hook("archive-message-added", function(event) - local session, stanza, for_user, stanza_id = event.origin, event.stanza, event.for_user, event.id; - local log = session.log or module._log - log("debug", "Marking stanza as archived, archive_id: %s, stanza: %s", tostring(stanza_id), tostring(stanza:top_tag())); - stanza._was_archived = true; -end); - module:hook("pre-resource-unbind", function (event) local session, err = event.session, event.error; if session.smacks then