widget: msc4407 push initial sticky map to widgets#5163
Closed
BillCarsonFr wants to merge 1 commit intodevelopfrom
Closed
widget: msc4407 push initial sticky map to widgets#5163BillCarsonFr wants to merge 1 commit intodevelopfrom
BillCarsonFr wants to merge 1 commit intodevelopfrom
Conversation
toger5
reviewed
Jan 27, 2026
Comment on lines
+817
to
+822
| private onPushInitialStickyState = async ( | ||
| ev: CustomEvent<IPushInitialStickyStateToWidgetActionRequest>, | ||
| ): Promise<void> => { | ||
| ev.preventDefault(); | ||
|
|
||
| const { roomId, stickyEvents } = ev.detail.data; |
Contributor
There was a problem hiding this comment.
Can this whole function be part of onEvent?
We branch out based on if there is a sticky key in the event.
We would need that anyhow for updating on new incoming sticky events. They also need to be added with _unstable_addStickyEvents
Member
Author
|
Closing as we choose to re-use the existing SendEvent action and send the sticky events one by one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on matrix-org/matrix-widget-api#161
Widgets have now the possibility to read sticky events.
When a widget is loaded it only gets access to the live sticky event, so it doesn't know about pre-existing sticky events.
This a bit similar than with state, when a widget is loaded it will receive an update of the current state.
This PR does the same for sticky events, the hosting client will push the current sticky states to the widget, so we need to add support for receiving such udpates.
When
org.matrix.msc4407.initial_sticky_stateis received the sticky events are parsed and injected in the room, to that the room view from the widget is up-to-date with the room from the host application.Checklist
public/exportedsymbols have accurate TSDoc documentation.