mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-17 04:30:29 +03:00
Add basic support for displaying emotes (#161)
This commit is contained in:
parent
b5c5cd9586
commit
14cd84dab7
3 changed files with 46 additions and 3 deletions
|
|
@ -282,6 +282,7 @@ function RoomViewContent({
|
|||
|
||||
let content = mEvent.getContent().body;
|
||||
if (typeof content === 'undefined') return null;
|
||||
const msgType = mEvent.getContent()?.msgtype;
|
||||
let reply = null;
|
||||
let reactions = null;
|
||||
let isMarkdown = mEvent.getContent().format === 'org.matrix.custom.html';
|
||||
|
|
@ -379,8 +380,10 @@ function RoomViewContent({
|
|||
);
|
||||
const userContent = (
|
||||
<MessageContent
|
||||
senderName={getUsernameOfRoomMember(mEvent.sender)}
|
||||
isMarkdown={isMarkdown}
|
||||
content={isMedia(mEvent) ? genMediaContent(mEvent) : content}
|
||||
msgType={msgType}
|
||||
isEdited={isEdited}
|
||||
/>
|
||||
);
|
||||
|
|
@ -496,6 +499,7 @@ function RoomViewContent({
|
|||
header={userHeader}
|
||||
reply={userReply}
|
||||
content={editEvent !== null && isEditingEvent ? null : userContent}
|
||||
msgType={msgType}
|
||||
editContent={editEvent !== null && isEditingEvent ? (
|
||||
<MessageEdit
|
||||
content={content}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue