Skip to content

Commit

Permalink
Merge pull request #481 from ivanbaldo/legacy
Browse files Browse the repository at this point in the history
Fix fatal typo in sendChangeStatus().
  • Loading branch information
tgalal committed Jan 7, 2015
2 parents 18eec92 + 4275665 commit e9c72b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Yowsup/Media/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def upload(self, sourcePath, uploadUrl):
self._d(POST)
self._d("sending REQUEST ")
self._d(hBAOS)
ssl_sock.write(bytearray(POST.encode()))
ssl_sock.write(bytearray(hBAOS.encode()))
ssl_sock.write(POST.encode())
ssl_sock.write(hBAOS.encode())

totalsent = 0
buf = 1024
Expand All @@ -92,7 +92,7 @@ def upload(self, sourcePath, uploadUrl):
stream = stream[buf:]
totalsent = totalsent + buf

ssl_sock.write(bytearray(fBAOS.encode()))
ssl_sock.write(fBAOS.encode())

sleep(1)
self._d("Reading response...")
Expand Down
7 changes: 4 additions & 3 deletions src/Yowsup/connectionmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,13 @@ def sendChangeStatus(self,status):
self._d("updating status to: %s"%(status))

idx = self.makeId("send_status_")
#TODO: self.readerThread.requests[idx] = self.readerThread.parseSendChangeStatus
statusNode = ProtocolTreeNode("status", None, None, status)
iqNode = ProtocolTreeNode("iq", {"to": self.domain, "type": "set", "id": idx, "xmlns": "status"}, [statusNode]);
iqNode = ProtocolTreeNode("iq", {"to": self.domain, "type": "set", "id": idx, "xmlns": "status"}, [statusNode])

self._writeNode(iqNode);
self._writeNode(iqNode)

return messageNode.getAttributeValue("id")
return iqNode.getAttributeValue("id")



Expand Down

0 comments on commit e9c72b8

Please sign in to comment.