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 |