Merge 8e2c03aaae
into 7c7a8737a0
This commit is contained in:
commit
210cbcbff6
|
@ -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)
|
||||
|
|
|
@ -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].changeStatusMessage(statusMessage)
|
||||
self.sessions[user].changeStatus(status)
|
||||
|
||||
def handleBuddyUpdatedRequest(self, user, buddy, nick, groups):
|
||||
|
|
Loading…
Reference in a new issue