From 1c80b4fd7dfdcfe6d3341f20506f04df8e479668 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Sat, 26 May 2018 16:27:30 +0300 Subject: [PATCH] process group creation fail --- toxygen/groups/groups_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toxygen/groups/groups_service.py b/toxygen/groups/groups_service.py index 0e9bef7..454efda 100644 --- a/toxygen/groups/groups_service.py +++ b/toxygen/groups/groups_service.py @@ -22,7 +22,8 @@ class GroupsService(tox_save.ToxSave): def create_new_gc(self, name, privacy_state): group_number = self._tox.group_new(privacy_state, name.encode('utf-8')) - self._add_new_group_by_number(group_number) + if group_number != -1: + self._add_new_group_by_number(group_number) def join_gc_by_id(self, chat_id, password): group_number = self._tox.group_join(chat_id, password)