summaryrefslogtreecommitdiff
path: root/sunshine/lqsoft/pygadu/twisted_protocol.py
diff options
context:
space:
mode:
Diffstat (limited to 'sunshine/lqsoft/pygadu/twisted_protocol.py')
-rwxr-xr-xsunshine/lqsoft/pygadu/twisted_protocol.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sunshine/lqsoft/pygadu/twisted_protocol.py b/sunshine/lqsoft/pygadu/twisted_protocol.py
index f5d5481..ff99bba 100755
--- a/sunshine/lqsoft/pygadu/twisted_protocol.py
+++ b/sunshine/lqsoft/pygadu/twisted_protocol.py
@@ -153,6 +153,10 @@ class GaduClient(Protocol):
def _handleMessageAckPacket(self, msg):
print "MSG_Status=%x, recipient=%d, seq=%d" % (msg.msg_status, msg.recipient, msg.seq)
+ def _handleTypingNotifyPacket(self, data):
+ #print "MSG Typing Notify uin=%d, type=%d" % (data.uin, data.type)
+ self.user_profile.onTypingNotification(data)
+
def _handleDisconnectPacket(self, msg):
print 'Server sent - disconnect packet'
Protocol.connectionLost(self, None)
@@ -216,6 +220,10 @@ class GaduClient(Protocol):
self._sendPacket( klass( recipient=rcpt, seq=int(time.time()), content=payload) )
+ def sendTypingNotify(self, uin, type):
+ klass = Resolver.by_name('TypingNotifyPacket')
+ self._sendPacket(klass(uin=uin, type=type))
+
def sendConfMessage(self, rcpt, html_text, plain_message, contacts):
klass = Resolver.by_name('MessageOutPacket')