Philipp Hörist pushed to branch master at gajim / gajim
Commits:
8bc2ab09 by Philipp Hörist at 2017-09-03T22:35:56+02:00
Add more log output in case we drop carbons
- - - - -
2 changed files:
- gajim/common/connection.py
- gajim/common/connection_handlers_events.py
Changes:
=====================================
gajim/common/connection.py
=====================================
--- a/gajim/common/connection.py
+++ b/gajim/common/connection.py
@@ -741,7 +741,7 @@ class Connection(CommonConnection, ConnectionHandlers):
def check_jid(self, jid):
return helpers.parse_jid(jid)
- def get_own_jid(self):
+ def get_own_jid(self, warn=False):
"""
Return the last full JID we received on a bind event.
In case we were never connected it returns the bare JID from config.
@@ -750,6 +750,8 @@ class Connection(CommonConnection, ConnectionHandlers):
# This returns the full jid we received on the bind event
return self.registered_name
else:
+ if warn:
+ log.warning('only bare JID available')
# This returns the bare jid
return nbxmpp.JID(app.get_jid_from_account(self.name))
=====================================
gajim/common/connection_handlers_events.py
=====================================
--- a/gajim/common/connection_handlers_events.py
+++ b/gajim/common/connection_handlers_events.py
@@ -1156,12 +1156,12 @@ class MessageReceivedEvent(nec.NetworkIncomingEvent,
HelperEvent):
self.encrypted = False
account = self.conn.name
- if self.stanza.getFrom() == self.conn.get_own_jid():
+ if self.stanza.getFrom() == self.conn.get_own_jid(warn=True):
# Drop messages sent from our own full jid
# It can happen that when we sent message to our own bare jid
# that the server routes that message back to us
- log.info('Received message from self: %s, message is dropped'
- % self.stanza.getFrom())
+ log.info('Received message from self: %s, message is dropped',
+ self.stanza.getFrom())
return
# check if the message is a roster item exchange (XEP-0144)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/8bc2ab096eeff932b1626d7542bcd8443f92ba9e
---
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/8bc2ab096eeff932b1626d7542bcd8443f92ba9e
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits