This commit is contained in:
vitalyster 2013-08-06 12:22:56 -07:00
commit 210cbcbff6
2 changed files with 2 additions and 4 deletions

View file

@ -190,7 +190,7 @@ class Session:
self.call("presence_sendUnavailable")
def changeStatusMessage(self, statusMessage):
if statusMessage != self.statusMessage:
if (statusMessage != self.statusMessage) or (self.initialized == False):
self.statusMessage = statusMessage
self.call("profile_setStatus", (statusMessage.encode("utf-8"),))
self.logger.info("Status message changed: %s", statusMessage)

View file

@ -63,9 +63,7 @@ class WhatsAppBackend(SpectrumBackend):
def handleStatusChangeRequest(self, user, status, statusMessage):
self.logger.debug("handleStatusChangeRequest(user=%s, status=%d, statusMessage=%s)", user, status, statusMessage)
if len(statusMessage):
self.sessions[user].changeStatusMessage(statusMessage)
self.sessions[user].changeStatus(status)
def handleBuddyUpdatedRequest(self, user, buddy, nick, groups):