Software /
code /
prosody
Comparison
plugins/mod_s2s/mod_s2s.lua @ 9449:94033a2529b9
mod_s2s: Indicate origin of s2s error
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 08 Oct 2018 15:03:26 +0200 |
parent | 9412:063977461363 |
child | 9784:7fa273f8869e |
child | 11018:bacca65ce107 |
comparison
equal
deleted
inserted
replaced
9448:352e8b75c1ae | 9449:94033a2529b9 |
---|---|
79 }; | 79 }; |
80 for i, data in ipairs(sendq) do | 80 for i, data in ipairs(sendq) do |
81 local reply = data[2]; | 81 local reply = data[2]; |
82 if reply and not(reply.attr.xmlns) and bouncy_stanzas[reply.name] then | 82 if reply and not(reply.attr.xmlns) and bouncy_stanzas[reply.name] then |
83 reply.attr.type = "error"; | 83 reply.attr.type = "error"; |
84 reply:tag("error", {type = "cancel"}) | 84 reply:tag("error", {type = "cancel", by = session.from_host}) |
85 :tag("remote-server-not-found", {xmlns = "urn:ietf:params:xml:ns:xmpp-stanzas"}):up(); | 85 :tag("remote-server-not-found", {xmlns = "urn:ietf:params:xml:ns:xmpp-stanzas"}):up(); |
86 if reason then | 86 if reason then |
87 reply:tag("text", {xmlns = "urn:ietf:params:xml:ns:xmpp-stanzas"}) | 87 reply:tag("text", {xmlns = "urn:ietf:params:xml:ns:xmpp-stanzas"}) |
88 :text("Server-to-server connection failed: "..reason):up(); | 88 :text("Server-to-server connection failed: "..reason):up(); |
89 end | 89 end |