Skip to content

Commit

Permalink
Merge pull request #4592 from nextcloud/backport/4575/stable-3.5
Browse files Browse the repository at this point in the history
[stable-3.5] Display chat message inside the OS notification.
  • Loading branch information
allexzander authored May 23, 2022
2 parents c84e4d8 + aad424c commit af39601
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/tray/usermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ void User::slotBuildNotificationDisplay(const ActivityList &list)
qCInfo(lcActivity) << "Activity in blacklist, skip";
continue;
}
const auto message = AccountManager::instance()->accounts().count() == 1 ? "" : activity._accName;
const auto message = activity._objectType == QStringLiteral("chat")
? activity._message : AccountManager::instance()->accounts().count() == 1 ? "" : activity._accName;
showDesktopNotification(activity._subject, message, activity._id); // We assigned the notif. id to the activity id
_activityModel->addNotificationToActivityList(activity);
}
Expand Down

0 comments on commit af39601

Please sign in to comment.