diff options
Diffstat (limited to 'slixmpp/plugins/xep_0280/carbons.py')
-rw-r--r-- | slixmpp/plugins/xep_0280/carbons.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/slixmpp/plugins/xep_0280/carbons.py b/slixmpp/plugins/xep_0280/carbons.py index a64ccbfd..aa71f7f1 100644 --- a/slixmpp/plugins/xep_0280/carbons.py +++ b/slixmpp/plugins/xep_0280/carbons.py @@ -28,7 +28,7 @@ class XEP_0280(BasePlugin): name = 'xep_0280' description = 'XEP-0280: Message Carbons' - dependencies = set(['xep_0030', 'xep_0297']) + dependencies = {'xep_0030', 'xep_0297'} stanza = stanza def plugin_init(self): @@ -61,10 +61,12 @@ class XEP_0280(BasePlugin): self.xmpp.plugin['xep_0030'].add_feature('urn:xmpp:carbons:2') def _handle_carbon_received(self, msg): - self.xmpp.event('carbon_received', msg) + if msg['from'].bare == self.xmpp.boundjid.bare: + self.xmpp.event('carbon_received', msg) def _handle_carbon_sent(self, msg): - self.xmpp.event('carbon_sent', msg) + if msg['from'].bare == self.xmpp.boundjid.bare: + self.xmpp.event('carbon_sent', msg) def enable(self, ifrom=None, timeout=None, callback=None, timeout_callback=None): |