plugins/muc/muc.lib.lua
changeset 9059 37e287113a8d
parent 9058 603887e0e69b
child 9060 df18f8398548
equal deleted inserted replaced
9058:603887e0e69b 9059:37e287113a8d
  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(invite.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)