Fix crash when sending message

Ensure the message has an eventId which only happens after the message
is sent.
This commit is contained in:
Carl Schwan
2024-05-28 15:21:04 +02:00
parent db57111188
commit d2a79214b5

View File

@@ -440,7 +440,7 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const
}
if (role == ContentModelRole) {
if (!evt.isStateEvent()) {
if (!evt.isStateEvent() && !evt.id().isEmpty()) {
return QVariant::fromValue<MessageContentModel *>(new MessageContentModel(m_currentRoom, &evt));
}
if (evt.isStateEvent()) {