reverted bad commit

This commit is contained in:
Goffi 2012-10-21 12:55:27 +02:00
commit 72da42f762

View file

@ -37,7 +37,6 @@ class SatXMPPClient(client.XMPPClient):
self.host_app = host_app
self.client_initialized = defer.Deferred()
self.conn_deferred = defer.Deferred()
self.ignored = set()
def getConnectionDeferred(self):
"""Return a deferred which fire when the client is connected"""
@ -98,20 +97,6 @@ class SatXMPPClient(client.XMPPClient):
self.host_app.bridge.disconnected(self.profile) #we send the signal to the clients
self.host_app.purgeClient(self.profile) #and we remove references to this client
def ignore(self, entity_jid):
"""Put entity in ignore list
@param entity_jid: jid of the entity to ignore"""
self.ignored.add(entity_jid)
def unignore(self, entity_jid):
"""Remove an entity from ignore list
@param entity_jid: jid of the entity to ignore"""
self.ignored.discard(entity_jid)
def isIgnored(self, entity_jid):
"""Tell if an entity is in ignore
@param entity_jid: jid of the entity to ignore"""
return entity_jid in self.ignored
class SatMessageProtocol(xmppim.MessageProtocol):
@ -120,12 +105,7 @@ class SatMessageProtocol(xmppim.MessageProtocol):
self.host = host
def onMessage(self, message):
debug (_(u"got message from: %s") % message["from"])
if self.parent.isIgnored(jid.JID(message["from"])):
info(_(u"%s is ignored, discarding the message") % message["from"])
return
debug (_(u"got message from: %s"), message["from"])
if not self.host.trigger.point("MessageReceived",message, profile=self.parent.profile):
return
for e in message.elements():