plugins/groupchat.lua

changeset 44
8e508f08cc7f
parent 42
5ee2eccabcc9
child 45
aa797b0a98e7
equal deleted inserted replaced
43:dd99a0dde016 44:8e508f08cc7f
105 105
106 function room_mt:send(stanza) 106 function room_mt:send(stanza)
107 if stanza.name == "message" and not stanza.attr.type then 107 if stanza.name == "message" and not stanza.attr.type then
108 stanza.attr.type = "groupchat"; 108 stanza.attr.type = "groupchat";
109 end 109 end
110 if stanza.attr.type == "groupchat" then 110 if stanza.attr.type == "groupchat" or not stanza.attr.to then
111 stanza.attr.to = self.jid; 111 stanza.attr.to = self.jid;
112 end 112 end
113 self.bot:send(stanza); 113 self.bot:send(stanza);
114 end 114 end
115 115

mercurial