Mercurial > libervia-backend
comparison src/core/sat_main.py @ 2128:aa94f33fd2ad
plugin otr: various improvments:
- messageSend trigger now use pre_xml_treatments so it doesn't block other triggers of higher priority
- text commands now use a very high priority, as it is local command and should not be blocked in most of cases
- new otrState signal, to send state change to frontends
- history is not skipped anymore, a future option may change this behaviour
- OTR trigger are skipped on groupchat messages
- context_manager is now in client instead of being global to plugin
- removed fixPotr as it is fixed upstream
note triggers should be improved for encryption methods, as skipping an encrypter may break security, but putting it in top priority may break nice features.
fix bug 170
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 01 Feb 2017 21:44:24 +0100 |
parents | 2f264f3df280 |
children | 6a66c8c5a567 |
comparison
equal
deleted
inserted
replaced
2127:8717e9cc95c0 | 2128:aa94f33fd2ad |
---|---|
640 data["type"] == "chat" if data["subject"] else "normal" | 640 data["type"] == "chat" if data["subject"] else "normal" |
641 | 641 |
642 # FIXME: send_only is used by libervia's OTR plugin to avoid | 642 # FIXME: send_only is used by libervia's OTR plugin to avoid |
643 # the triggers from frontend, and no_trigger do the same | 643 # the triggers from frontend, and no_trigger do the same |
644 # thing internally, this could be unified | 644 # thing internally, this could be unified |
645 send_only = data['extra'].get('send_only', None) | 645 send_only = data['extra'].get('send_only', False) |
646 | 646 |
647 if not no_trigger and not send_only: | 647 if not no_trigger and not send_only: |
648 if not self.trigger.point("messageSend", client, data, pre_xml_treatments, post_xml_treatments): | 648 if not self.trigger.point("messageSend", client, data, pre_xml_treatments, post_xml_treatments): |
649 return defer.succeed(None) | 649 return defer.succeed(None) |
650 | 650 |