Comparison

plugins/muc/muc.lib.lua @ 9054:0bf0ff3b0f91

MUC: Use JID from correct place when adding <body> to mediated invites (thanks Link Mauve/lovetox)
author Matthew Wild <mwild1@gmail.com>
date Tue, 17 Jul 2018 18:15:15 +0100
parent 9052:5017e43ccc39
child 9055:603887e0e69b
comparison
equal deleted inserted replaced
9053:ea9e1f8f3013 9054:0bf0ff3b0f91
1086 local room, stanza = event.room, event.stanza; 1086 local room, stanza = event.room, event.stanza;
1087 if not stanza:get_child("body") then 1087 if not stanza:get_child("body") then
1088 local invite = stanza:get_child("x", "http://jabber.org/protocol/muc#user"):get_child("invite"); 1088 local invite = stanza:get_child("x", "http://jabber.org/protocol/muc#user"):get_child("invite");
1089 local reason = invite:get_child_text("reason") or ""; 1089 local reason = invite:get_child_text("reason") or "";
1090 stanza:tag("body") 1090 stanza:tag("body")
1091 :text(invite.attr.from.." invited you to the room "..room.jid..(reason == "" and (" ("..reason..")") or "")) 1091 :text(jid_bare(stanza.attr.from).." invited you to the room "..room.jid..(reason == "" and (" ("..reason..")") or ""))
1092 :up(); 1092 :up();
1093 end 1093 end
1094 end); 1094 end);
1095 1095
1096 function room_mt:handle_mediated_decline(origin, stanza) 1096 function room_mt:handle_mediated_decline(origin, stanza)