Fix crash in E2E rooms
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
74b8a0f10f
commit
3e75841a83
1 changed files with 8 additions and 8 deletions
|
@ -574,7 +574,14 @@ function Message({
|
|||
let { body } = content;
|
||||
const username = getUsernameOfRoomMember(mEvent.sender);
|
||||
|
||||
if (typeof body === 'undefined') return null;
|
||||
const edit = useCallback(() => {
|
||||
setIsEditing(true);
|
||||
}, []);
|
||||
const reply = useCallback(() => {
|
||||
replyTo(senderId, eventId, body);
|
||||
}, [body]);
|
||||
|
||||
if (body === undefined) return null;
|
||||
if (msgType === 'm.emote') className.push('message--type-emote');
|
||||
|
||||
let isCustomHTML = content.format === 'org.matrix.custom.html';
|
||||
|
@ -594,13 +601,6 @@ function Message({
|
|||
body = parseReply(body)?.body ?? body;
|
||||
}
|
||||
|
||||
const edit = useCallback(() => {
|
||||
setIsEditing(true);
|
||||
}, []);
|
||||
const reply = useCallback(() => {
|
||||
replyTo(senderId, eventId, body);
|
||||
}, [body]);
|
||||
|
||||
return (
|
||||
<div className={className.join(' ')}>
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue