Fix RoomMessageUnknown not seen as general event
This commit is contained in:
parent
9d89409379
commit
b3f93b969c
|
@ -67,11 +67,13 @@ HTileDelegate {
|
|||
subtitle.text: {
|
||||
if (! lastEvent) return ""
|
||||
|
||||
// If it's an emote or non-message/media event
|
||||
if (lastEvent.event_type === "RoomMessageEmote" ||
|
||||
(! lastEvent.event_type.startsWith("RoomMessage") &&
|
||||
! lastEvent.event_type.startsWith("RoomEncrypted")))
|
||||
{
|
||||
let isEmote = lastEvent.event_type === "RoomMessageEmote"
|
||||
let isMsg = lastEvent.event_type.startsWith("RoomMessage")
|
||||
let isUnknownMsg = lastEvent.event_type === "RoomMessageUnknown"
|
||||
let isCryptMedia = lastEvent.event_type.startsWith("RoomEncrypted")
|
||||
|
||||
// If it's a general event
|
||||
if (isEmote || isUnknownMsg || (! isMsg && ! isCryptMedia)) {
|
||||
return Utils.processedEventText(lastEvent)
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,9 @@ function processedEventText(ev) {
|
|||
if (ev.event_type == "RoomMessageEmote")
|
||||
return coloredNameHtml(ev.sender_name, ev.sender_id) + " " + ev.content
|
||||
|
||||
if (ev.event_type.startsWith("RoomMessage")) return ev.content
|
||||
let unknown = ev.event_type === "RoomMessageUnknown"
|
||||
|
||||
if (ev.event_type.startsWith("RoomMessage") && ! unknown) return ev.content
|
||||
if (ev.event_type.startsWith("RoomEncrypted")) return ev.content
|
||||
|
||||
let text = qsTr(ev.content).arg(
|
||||
|
|
Loading…
Reference in New Issue
Block a user