From 2fc90880b88923ec4aabc56aef47a29fb5d8c072 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Fri, 27 Jan 2017 21:09:15 +0300 Subject: [PATCH] api update --- toxygen/profile.py | 2 +- toxygen/tox.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/toxygen/profile.py b/toxygen/profile.py index 2cb8e29..fc54a31 100644 --- a/toxygen/profile.py +++ b/toxygen/profile.py @@ -1308,7 +1308,7 @@ class Profile(basecontact.BaseContact, Singleton): fr_req = QtGui.QApplication.translate('MainWindow', 'Group chat invite', None, QtGui.QApplication.UnicodeUTF8) reply = QtGui.QMessageBox.question(None, fr_req, info, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) if reply == QtGui.QMessageBox.Yes: # accepted - num = self._tox.group_invite_accept(data) + num = self._tox.group_invite_accept(data, friend_num) data = self._tox.get_savedata() ProfileHelper.get_instance().save_profile(data) print('In gc invite', num) diff --git a/toxygen/tox.py b/toxygen/tox.py index 6cfca5a..2e88366 100644 --- a/toxygen/tox.py +++ b/toxygen/tox.py @@ -2154,7 +2154,7 @@ class Tox: result = Tox.libtoxcore.tox_group_invite_friend(self._tox_pointer, groupnumber, friend_number, byref(error)) return result - def group_invite_accept(self, invite_data, password=None): + def group_invite_accept(self, invite_data, friend_number, password=None): """ Accept an invite to a group chat that the client previously received from a friend. The invite is only valid while the inviter is present in the group. @@ -2167,7 +2167,7 @@ class Tox: error = c_int() f = Tox.libtoxcore.tox_group_invite_accept f.restype = c_uint32 - result = f(self._tox_pointer, invite_data, len(invite_data), password, + result = f(self._tox_pointer, friend_number, invite_data, len(invite_data), password, len(password) if password is not None else 0, byref(error)) print('Invite accept. Result:', result, 'Error:', error.value) return result