Show message type prefix in thread root & reply previews (#28361)

* Extract EventPreview from PinnedMessageBanner

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Show message type prefix in thread root previews

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Show message type prefix in thread reply preview

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-11-05 11:34:42 +00:00 committed by GitHub
parent c9d9c421bc
commit aeabf3b188
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 215 additions and 154 deletions

View file

@ -84,7 +84,7 @@ export const makeThreadEvents = ({
rootEvent.setUnsigned({
"m.relations": {
[RelationType.Thread]: {
latest_event: events[events.length - 1],
latest_event: events[events.length - 1].event,
count: length,
current_user_participated: [...participantUserIds, authorId].includes(currentUserId!),
},