Don't show erroneous "This event has no content" text for files"
This commit is contained in:
@@ -570,7 +570,8 @@ QVariantMap TextHandler::getAttributes(const QString &tag, const QString &tagStr
|
||||
QList<MessageComponent>
|
||||
TextHandler::textComponents(QString string, Qt::TextFormat inputFormat, const NeoChatRoom *room, const Quotient::RoomEvent *event, bool isEdited)
|
||||
{
|
||||
if (string.trimmed().isEmpty()) {
|
||||
if (string.trimmed().isEmpty() && event->is<Quotient::RoomMessageEvent>()
|
||||
&& !eventCast<const Quotient::RoomMessageEvent>(event)->has<Quotient::EventContent::FileContentBase>()) {
|
||||
return {MessageComponent{MessageComponentType::Text, i18n("<i>This event does not have any content.</i>"), {}}};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user