mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
parent
a930b398d4
commit
dcf87f7475
|
@ -37,6 +37,7 @@
|
|||
#include "src/platform/timer.h"
|
||||
#include "systemtrayicon.h"
|
||||
#include "src/nexus.h"
|
||||
#include "src/widget/gui.h"
|
||||
#include "src/offlinemsgengine.h"
|
||||
#include <cassert>
|
||||
#include <QMessageBox>
|
||||
|
@ -855,6 +856,8 @@ void Widget::copyFriendIdToClipboard(int friendId)
|
|||
void Widget::onGroupInviteReceived(int32_t friendId, uint8_t type, QByteArray invite)
|
||||
{
|
||||
if (type == TOX_GROUPCHAT_TYPE_TEXT || type == TOX_GROUPCHAT_TYPE_AV)
|
||||
{
|
||||
if (GUI::askQuestion(tr("Group invite", "popup title"), tr("%1 has invited you to a groupchat. Would you like to join?", "popup text").arg(Nexus::getCore()->getFriendUsername(friendId))))
|
||||
{
|
||||
int groupId = Nexus::getCore()->joinGroupchat(friendId, type, (uint8_t*)invite.data(), invite.length());
|
||||
if (groupId < 0)
|
||||
|
@ -863,6 +866,7 @@ void Widget::onGroupInviteReceived(int32_t friendId, uint8_t type, QByteArray in
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning() << "Widget::onGroupInviteReceived: Unknown groupchat type:"<<type;
|
||||
|
|
Loading…
Reference in New Issue
Block a user