Fix emote events (/me) display name display

This commit is contained in:
miruka 2020-09-05 09:14:40 -04:00
parent 5dca7d0a35
commit b12e38f41b
2 changed files with 2 additions and 3 deletions

View File

@ -347,8 +347,7 @@ Rectangle {
} }
function renderEventAsOneLine(event) { function renderEventAsOneLine(event) {
return ( return event.event_type === "RoomMessageEmote" || (
event.event_type !== "RoomMessageEmote" &&
! event.event_type.startsWith("RoomMessage") && ! event.event_type.startsWith("RoomMessage") &&
! event.event_type.startsWith("RoomEncrypted") ! event.event_type.startsWith("RoomEncrypted")
) )

View File

@ -207,7 +207,7 @@ QtObject {
if (type === "RoomMessageEmote") if (type === "RoomMessageEmote")
return ev.content.match(/^\s*<(p|h[1-6])>/) ? return ev.content.match(/^\s*<(p|h[1-6])>/) ?
ev.content.replace(/(^\s*<(p|h[1-6])>)/, `$1 ${sender} `) : ev.content.replace(/(^\s*<(p|h[1-6])>)/, `$1${sender} `) :
sender + " " + ev.content sender + " " + ev.content
if (type.startsWith("RoomMessage") && ! unknownMsg) if (type.startsWith("RoomMessage") && ! unknownMsg)