Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
d67185cf by Philipp Hörist at 2023-11-06T13:32:13+01:00
fix: PubSub: Narrow accepted message types
- - - - -
1 changed file:
- nbxmpp/modules/pubsub.py
Changes:
=====================================
nbxmpp/modules/pubsub.py
=====================================
@@ -17,6 +17,7 @@
from collections import namedtuple
+from nbxmpp.const import MessageType
from nbxmpp.task import iq_request_task
from nbxmpp.errors import is_error
from nbxmpp.errors import PubSubStanzaError
@@ -47,6 +48,9 @@ class PubSub(BaseModule):
]
def _process_pubsub_base(self, _client, stanza, properties):
+ if properties.type not in (MessageType.HEADLINE, MessageType.NORMAL):
+ return
+
properties.pubsub = True
event = stanza.getTag('event', namespace=Namespace.PUBSUB_EVENT)
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/d67185cfda2171683eba59179ac0a96dfa24f2c8
--
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/d67185cfda2171683eba59179ac0a96dfa24f2c8
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]