Commit 8bc2ab09 authored by Philipp Hörist's avatar Philipp Hörist

Add more log output in case we drop carbons

parent 6bb822f8
......@@ -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
if warn:
log.warning('only bare JID available')
# This returns the bare jid
return nbxmpp.JID(app.get_jid_from_account(
......@@ -1156,12 +1156,12 @@ class MessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
self.encrypted = False
account =
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'Received message from self: %s, message is dropped'
% self.stanza.getFrom())'Received message from self: %s, message is dropped',
# check if the message is a roster item exchange (XEP-0144)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment