Don't show room name in notification if equal to sender
This is the case for direct messages.
This commit is contained in:
@@ -34,7 +34,13 @@ void NotificationsManager::postNotification(const QString &roomid, const QString
|
||||
QPixmap img;
|
||||
img.convertFromImage(icon);
|
||||
KNotification *notification = new KNotification("message");
|
||||
notification->setTitle(i18n("%1 (%2)", sender, roomname));
|
||||
|
||||
if (sender == roomname) {
|
||||
notification->setTitle(sender);
|
||||
} else {
|
||||
notification->setTitle(i18n("%1 (%2)", sender, roomname));
|
||||
}
|
||||
|
||||
notification->setText(text.toHtmlEscaped());
|
||||
notification->setPixmap(img);
|
||||
notification->sendEvent();
|
||||
|
||||
Reference in New Issue
Block a user