Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0249.py @ 1371:876c9fbd0b3d
plugin text command, XEP-0045, XEP-0048, XEP-0249: removed feedBackWrongContext which is no more usefull with new _contextValid method
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 19 Mar 2015 14:30:08 +0100 |
parents | bf3f669a6052 |
children | 6d0e01809893 |
comparison
equal
deleted
inserted
replaced
1370:53c7678c27a6 | 1371:876c9fbd0b3d |
---|---|
169 """invite someone in the room | 169 """invite someone in the room |
170 | 170 |
171 @command (group): (JID) | 171 @command (group): (JID) |
172 - JID: the JID of the person to invite | 172 - JID: the JID of the person to invite |
173 """ | 173 """ |
174 log.debug("Catched invite command") | |
175 | |
176 if mess_data['type'] != "groupchat": | |
177 self.host.plugins[C.TEXT_CMDS].feedBackWrongContext('invite', 'groupchat', mess_data, profile) | |
178 return False | |
179 | |
180 jid_s = mess_data["unparsed"].strip() | 174 jid_s = mess_data["unparsed"].strip() |
181 try: | 175 try: |
182 assert(jid_s) | 176 assert(jid_s) |
183 jid_ = jid.JID(jid_s) | 177 jid_ = jid.JID(jid_s) |
184 assert(jid_.user) | 178 assert(jid_.user) |