currently: (in telepathy-python/telepathy/server/channel.py:269) @dbus.service.signal(CHANNEL_TYPE_TEXT, signature='uuuuus') def Received(self, id, timestamp, sender, type, flags, text): self._pending_messages[id] = (timestamp, sender, type, flags, text) This will always emit a signal I suggest either: creating a standard wrapper (so that users don't have to): def received(self, id, timestamp, sender, type, flags, text): """Wrapper around broken Received signal""" if id not in self._pending_messages: self.Received(id, timestamp, sender, type, flags, text) or raising ValueError, to stop the signal being transmitted: @dbus.service.signal(CHANNEL_TYPE_TEXT, signature='uuuuus') def Received(self, id, timestamp, sender, type, flags, text): if id in self._pending_messages: raise ValueError("You can't receive the same message twice.") else: self._pending_messages[id] = (timestamp, sender, type, flags, text)
(In reply to comment #0) > or raising ValueError, to stop the signal being transmitted: Seems fair. I pushed a commit to fix this. (Next time, please give a git format-patch patch!)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.