Fix on_group_invite

This commit is contained in:
Dmitry Cherkassov 2014-12-17 11:15:36 +00:00
parent b446079a43
commit 81f98edf06

View file

@ -71,7 +71,7 @@ class SyncBot(Tox):
self.av = AV(self, 10) self.av = AV(self, 10)
self.connect() self.connect()
self.set_name('SyncBot') self.set_name('bnwox-sync')
self.set_status_message("Send me a message with the word 'invite'") self.set_status_message("Send me a message with the word 'invite'")
print('ID: %s' % self.get_address()) print('ID: %s' % self.get_address())
@ -188,10 +188,10 @@ class SyncBot(Tox):
self.request = True self.request = True
self.ensure_exe(self.send_message, (self.bid, 'invite')) self.ensure_exe(self.send_message, (self.bid, 'invite'))
def on_group_invite(self, friendid, pk): def on_group_invite(self, friendid, type, data):
if not self.joined: if not self.joined:
self.joined = True self.joined = True
self.tox_group_id = self.join_groupchat(friendid, pk) self.tox_group_id = self.join_groupchat(friendid, data)
print('Joined groupchat.') print('Joined groupchat.')
def on_group_message(self, groupnumber, friendgroupnumber, message): def on_group_message(self, groupnumber, friendgroupnumber, message):