Add logger remove calls
This commit is contained in:
parent
05525a8a3a
commit
479efedc26
|
@ -416,6 +416,7 @@ class SpectrumLayer(YowInterfaceLayer):
|
||||||
def onEvent(self, layerEvent):
|
def onEvent(self, layerEvent):
|
||||||
# We cannot use __init__, since it can take no arguments
|
# We cannot use __init__, since it can take no arguments
|
||||||
if layerEvent.name == SpectrumLayer.EVENT_START:
|
if layerEvent.name == SpectrumLayer.EVENT_START:
|
||||||
|
self.logger = logging.getLogger(self.__class__.__name__)
|
||||||
self.backend = layerEvent.getArg("backend")
|
self.backend = layerEvent.getArg("backend")
|
||||||
self.user = layerEvent.getArg("user")
|
self.user = layerEvent.getArg("user")
|
||||||
self.legacyName = layerEvent.getArg("legacyName")
|
self.legacyName = layerEvent.getArg("legacyName")
|
||||||
|
@ -433,9 +434,6 @@ class SpectrumLayer(YowInterfaceLayer):
|
||||||
|
|
||||||
self.updateRoster()
|
self.updateRoster()
|
||||||
|
|
||||||
self.call("ready")
|
|
||||||
self.call("group_getGroups", ("participating",))
|
|
||||||
|
|
||||||
@ProtocolEntityCallback("failed")
|
@ProtocolEntityCallback("failed")
|
||||||
def onAuthFailed(self, entity):
|
def onAuthFailed(self, entity):
|
||||||
self.logger.info("Auth failed: %s (%s)", self.user, entity.getReason())
|
self.logger.info("Auth failed: %s (%s)", self.user, entity.getReason())
|
||||||
|
@ -458,7 +456,6 @@ class SpectrumLayer(YowInterfaceLayer):
|
||||||
for number in remove:
|
for number in remove:
|
||||||
self.backend.handleBuddyChanged(self.user, number, "", [], protocol_pb2.STATUS_NONE)
|
self.backend.handleBuddyChanged(self.user, number, "", [], protocol_pb2.STATUS_NONE)
|
||||||
self.backend.handleBuddyRemoved(self.user, number)
|
self.backend.handleBuddyRemoved(self.user, number)
|
||||||
self.broadcastEvent(YowNetworkLayer)
|
|
||||||
entity = UnsubscribePresenceProtocolEntity(number + "@s.whatsapp.net")
|
entity = UnsubscribePresenceProtocolEntity(number + "@s.whatsapp.net")
|
||||||
self.toLower(entity)
|
self.toLower(entity)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue