Mercurial > libervia-backend
diff src/plugins/plugin_xep_0048.py @ 1002:291eb8216f6e
plugins TEXT-COMMANDS, XEP-0045, XEP-0048, XEP-0249:
- give a feedback instead of sending the message when the command is invalid or used in a wrong context
- add command /join for XEP-0249
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 30 Apr 2014 16:34:09 +0200 |
parents | 301b342c697a |
children | 876c9fbd0b3d |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0048.py Sun Apr 27 18:51:03 2014 +0200 +++ b/src/plugins/plugin_xep_0048.py Wed Apr 30 16:34:09 2014 +0200 @@ -428,9 +428,8 @@ txt_cmd = self.host.plugins[C.TEXT_CMDS] if mess_data['type'] != "groupchat": - #/bookmark command does nothing if we are not on a group chat - log.info("Ignoring /bookmark command on a non groupchat message") - return True + self.host.plugins[C.TEXT_CMDS].feedBackWrongContext('bookmark', 'groupchat', mess_data, profile) + return False options = mess_data["unparsed"].strip().split() if options and options[0] not in ('autojoin', 'remove'):