1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

test functional EventUtils (#8386)

* extract poll event test util

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test isContentActionable

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test canEditContent

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test functional eventutils

Signed-off-by: Kerry Archibald <kerrya@element.io>

* copyrights

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry
2022-04-21 18:14:10 +02:00
committed by GitHub
parent c70816d763
commit 73e8387799
5 changed files with 413 additions and 37 deletions

View File

@ -82,7 +82,7 @@ export function canEditContent(mxEvent: MatrixEvent): boolean {
M_POLL_START.matches(mxEvent.getType()) ||
(
(msgtype === MsgType.Text || msgtype === MsgType.Emote) &&
body &&
!!body &&
typeof body === 'string'
)
);