diff options
author | Philipp Hörist <philipp@hoerist.com> | 2023-11-06 15:32:13 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2023-11-06 15:32:13 +0300 |
commit | d67185cfda2171683eba59179ac0a96dfa24f2c8 (patch) | |
tree | 063cdaf67000f0db1a85c0cf04efee6695cb3cf2 | |
parent | 3f740ee6b1d127f640ae34226ee1e60f2ad52295 (diff) |
fix: PubSub: Narrow accepted message types
-rw-r--r-- | nbxmpp/modules/pubsub.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nbxmpp/modules/pubsub.py b/nbxmpp/modules/pubsub.py index 2bfde8c..ed0da8e 100644 --- a/nbxmpp/modules/pubsub.py +++ b/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) |