Don't show spoilers in sidebar or notifications if possible
fixes #1247
This commit is contained in:
parent
e7d28b96da
commit
6150979270
37 changed files with 2375 additions and 1132 deletions
|
|
@ -107,7 +107,8 @@ NotificationsManager::postNotification(const mtx::responses::Notification ¬if
|
|||
QString template_ = getMessageTemplate(notification);
|
||||
// TODO: decrypt this message if the decryption setting is on in the UserSettings
|
||||
if (std::holds_alternative<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>>(
|
||||
notification.event)) {
|
||||
notification.event) ||
|
||||
!template_.contains("%2")) {
|
||||
postNotif(template_);
|
||||
return;
|
||||
}
|
||||
|
|
@ -115,7 +116,7 @@ NotificationsManager::postNotification(const mtx::responses::Notification ¬if
|
|||
if (hasMarkup_) {
|
||||
if (hasImages_ &&
|
||||
(mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Image ||
|
||||
mtx::accessors::msg_type(notification.event) == mtx::events::MessageType::Image)) {
|
||||
mtx::accessors::event_type(notification.event) == mtx::events::EventType::Sticker)) {
|
||||
MxcImageProvider::download(
|
||||
QString::fromStdString(mtx::accessors::url(notification.event))
|
||||
.remove(QStringLiteral("mxc://")),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue