MessageModel: Handle stickers in ContentModelRole

We were ignoring stickers completely when handling them previously, as
it was handled as event and not one with id.

BUG: 501553
This commit is contained in:
Akseli Lahtinen
2025-04-18 18:44:05 +03:00
parent a148c6e326
commit 0cc14f710d

View File

@@ -127,7 +127,7 @@ QVariant MessageModel::data(const QModelIndex &idx, int role) const
}
if (role == ContentModelRole) {
if (event->get().is<EncryptedEvent>() || event->get().is<PollStartEvent>()) {
if (event->get().is<EncryptedEvent>() || event->get().is<PollStartEvent>() || event->get().is<StickerEvent>()) {
return QVariant::fromValue<MessageContentModel *>(ContentProvider::self().contentModelForEvent(m_room, event->get().id()));
}