Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2023-11-06 15:32:13 +0300
committerPhilipp Hörist <philipp@hoerist.com>2023-11-06 15:32:13 +0300
commitd67185cfda2171683eba59179ac0a96dfa24f2c8 (patch)
tree063cdaf67000f0db1a85c0cf04efee6695cb3cf2
parent3f740ee6b1d127f640ae34226ee1e60f2ad52295 (diff)
fix: PubSub: Narrow accepted message types
-rw-r--r--nbxmpp/modules/pubsub.py4
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)