pull/475/head
Loren Burkholder 4 years ago committed by Nicolas Werner
parent 98b2fee71b
commit 5da6ab0aec
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 25
      src/notifications/ManagerLinux.cpp

@ -214,19 +214,18 @@ NotificationsManager::formatNotification(const mtx::responses::Notification &not
": ");
if (hasMarkup_) {
if (hasImages_ &&
mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Image)
{
QString imgPath = cacheImage(notification.event);
if (imgPath.isNull())
return mtx::accessors::formattedBodyWithFallback(notification.event).prepend(messageLeadIn);
else
return QString(
"<img src=\"file:///" + imgPath +
"\" alt=\"" +
mtx::accessors::formattedBodyWithFallback(notification.event) +
"\">")
.prepend(messageLeadIn);
if (hasImages_ && mtx::accessors::msg_type(notification.event) ==
mtx::events::MessageType::Image) {
QString imgPath = cacheImage(notification.event);
if (imgPath.isNull())
return mtx::accessors::formattedBodyWithFallback(notification.event)
.prepend(messageLeadIn);
else
return QString("<img src=\"file:///" + imgPath + "\" alt=\"" +
mtx::accessors::formattedBodyWithFallback(
notification.event) +
"\">")
.prepend(messageLeadIn);
}
return mtx::accessors::formattedBodyWithFallback(notification.event)

Loading…
Cancel
Save