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
This commit is contained in:
Goffi 2017-02-01 21:44:24 +01:00
commit 115f5ae0e1

View file

@ -642,7 +642,7 @@ class SAT(service.Service):
# FIXME: send_only is used by libervia's OTR plugin to avoid
# the triggers from frontend, and no_trigger do the same
# thing internally, this could be unified
send_only = data['extra'].get('send_only', None)
send_only = data['extra'].get('send_only', False)
if not no_trigger and not send_only:
if not self.trigger.point("messageSend", client, data, pre_xml_treatments, post_xml_treatments):