equal
deleted
inserted
replaced
53 local new_id = require "util.id".short; |
53 local new_id = require "util.id".short; |
54 local watchdog = require "util.watchdog"; |
54 local watchdog = require "util.watchdog"; |
55 local it = require"util.iterators"; |
55 local it = require"util.iterators"; |
56 |
56 |
57 local sessionmanager = require "core.sessionmanager"; |
57 local sessionmanager = require "core.sessionmanager"; |
58 local core_process_stanza = prosody.core_process_stanza; |
|
59 |
58 |
60 local xmlns_errors = "urn:ietf:params:xml:ns:xmpp-stanzas"; |
59 local xmlns_errors = "urn:ietf:params:xml:ns:xmpp-stanzas"; |
61 local xmlns_delay = "urn:xmpp:delay"; |
60 local xmlns_delay = "urn:xmpp:delay"; |
62 local xmlns_mam2 = "urn:xmpp:mam:2"; |
61 local xmlns_mam2 = "urn:xmpp:mam:2"; |
63 local xmlns_sm2 = "urn:xmpp:sm:2"; |
62 local xmlns_sm2 = "urn:xmpp:sm:2"; |
418 session.outgoing_stanza_queue = nil; |
417 session.outgoing_stanza_queue = nil; |
419 for stanza in queue._queue:consume() do |
418 for stanza in queue._queue:consume() do |
420 if not module:fire_event("delivery/failure", { session = session, stanza = stanza }) then |
419 if not module:fire_event("delivery/failure", { session = session, stanza = stanza }) then |
421 if stanza.attr.type ~= "error" and stanza.attr.from ~= session.full_jid then |
420 if stanza.attr.type ~= "error" and stanza.attr.from ~= session.full_jid then |
422 local reply = st.error_reply(stanza, "cancel", "recipient-unavailable"); |
421 local reply = st.error_reply(stanza, "cancel", "recipient-unavailable"); |
423 core_process_stanza(session, reply); |
422 module:send(reply); |
424 end |
423 end |
425 end |
424 end |
426 end |
425 end |
427 end |
426 end |
428 end |
427 end |