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;
|
QPixmap img;
|
||||||
img.convertFromImage(icon);
|
img.convertFromImage(icon);
|
||||||
KNotification *notification = new KNotification("message");
|
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->setText(text.toHtmlEscaped());
|
||||||
notification->setPixmap(img);
|
notification->setPixmap(img);
|
||||||
notification->sendEvent();
|
notification->sendEvent();
|
||||||
|
|||||||
Reference in New Issue
Block a user