From 722aeb776e6755b2c5e4812c2618ad3a3beac7f3 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Tue, 11 Nov 2014 15:03:08 +0100 Subject: [PATCH] Compat with toxcore: New groupchats Text only is supported for now --- src/core.cpp | 17 ++++++++++++++--- src/core.h | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/core.cpp b/src/core.cpp index 2f8211519..c719d9215 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -479,10 +479,21 @@ void Core::onGroupAction(Tox*, int groupnumber, int peernumber, const uint8_t *a core->getGroupPeerName(groupnumber, peernumber), true); } -void Core::onGroupInvite(Tox*, int friendnumber, const uint8_t *group_public_key, uint16_t length,void *core) +void Core::onGroupInvite(Tox*, int friendnumber, uint8_t type, const uint8_t *data, uint16_t length,void *core) { - qDebug() << QString("Core: Group invite by %1").arg(friendnumber); - emit static_cast(core)->groupInviteReceived(friendnumber, group_public_key,length); + if (type == TOX_GROUPCHAT_TYPE_TEXT) + { + qDebug() << QString("Core: Text group invite by %1").arg(friendnumber); + emit static_cast(core)->groupInviteReceived(friendnumber, data,length); + } + else if (type == TOX_GROUPCHAT_TYPE_AV) + { + qDebug() << QString("Core: AV group invite by %1, not implemented").arg(friendnumber); + } + else + { + qWarning() << "Core: Group invite with unknown type "<