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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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'
)
);