diff options
author | mathieui <mathieui@mathieui.net> | 2014-04-29 22:14:03 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-04-29 22:14:03 +0200 |
commit | 5f0afab060aa84a1cd1a81ade027f80b580a291d (patch) | |
tree | c97a42b4f5b3972509325179790cff67751e1be3 /src/connection.py | |
parent | 793b78f0090d2e45e49cab9808b40f03a0b20e02 (diff) | |
download | poezio-5f0afab060aa84a1cd1a81ade027f80b580a291d.tar.gz poezio-5f0afab060aa84a1cd1a81ade027f80b580a291d.tar.bz2 poezio-5f0afab060aa84a1cd1a81ade027f80b580a291d.tar.xz poezio-5f0afab060aa84a1cd1a81ade027f80b580a291d.zip |
Do not ask for receipts in messages without a body
Diffstat (limited to 'src/connection.py')
-rw-r--r-- | src/connection.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/connection.py b/src/connection.py index 0af2b228..649cd0a2 100644 --- a/src/connection.py +++ b/src/connection.py @@ -15,10 +15,12 @@ log = logging.getLogger(__name__) import getpass import sleekxmpp +from sleekxmpp.plugins.xep_0184 import XEP_0184 -from config import config, options import common +import fixes from common import safeJID +from config import config, options class Connection(sleekxmpp.ClientXMPP): """ @@ -85,6 +87,9 @@ class Connection(sleekxmpp.ClientXMPP): self.register_plugin('xep_0085') self.register_plugin('xep_0115') + # monkey-patch xep_0184 to avoid requesting receipts for messages + # without a body + XEP_0184._filter_add_receipt_request = fixes._filter_add_receipt_request self.register_plugin('xep_0184') self.plugin['xep_0184'].auto_ack = config.get('ack_message_receipts', True) |