From 69424c63be8d0f352b5fd947b5dfcdd20ac485a4 Mon Sep 17 00:00:00 2001 From: sudden6 Date: Mon, 21 Mar 2016 21:56:52 +0100 Subject: [PATCH] update friend activity on groupchat events fixes #2848 --- src/widget/widget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 2e8a04ebe..cb5c5fc0a 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -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());