1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #3033

sudden6 (1):
      update friend activity on groupchat events     fixes #2848
This commit is contained in:
sudden6 2016-03-23 11:55:20 +01:00
commit 6c5d70d862
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -1418,6 +1418,8 @@ void Widget::copyFriendIdToClipboard(int friendId)
void Widget::onGroupInviteReceived(int32_t friendId, uint8_t type, QByteArray invite)
{
updateFriendActivity(FriendList::findFriend(friendId));
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).toHtmlEscaped()), true, false))
@ -1444,6 +1446,7 @@ void Widget::onGroupMessageReceived(int groupnumber, int peernumber, const QStri
return;
ToxId author = Core::getInstance()->getGroupPeerToxId(groupnumber, peernumber);
bool targeted = !author.isSelf() && (message.contains(nameMention) || message.contains(sanitizedNameMention));
if (targeted && !isAction)
g->getChatForm()->addAlertMessage(author, message, QDateTime::currentDateTime());