This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 828
Add a small indicator for when a new event is pinned #1486
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4f6cd6b
Add a small indicator for when a new event is pinned
turt2live 3656fdb
Store read pinned events as an array to avoid racing saves.
turt2live 5c37155
Don't assume we have a valid event.
turt2live a2b7f6d
Merge remote-tracking branch 'matrix-org/develop' into travis/pinned-…
turt2live de6fc32
Show an indicator when there are any pins in the room
turt2live 142d23a
Cap the read pin event IDs to 10
turt2live File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't make sure that the
lastReadEvent
is ahead in the DAG relative topinnedEvents.getId()
. This could lead to two clients (i.e. clients with potentially differing state event data) fighting over which pinned message is really the last one read.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the best way to check for this? Just using
.getTs()
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't technically rely on the timestamp to compare events because it might not be accurate. If we want to do this with some guarantee of the event ID always "increasing" in the timeline, we'd need server-side support. This would look something like
m.fully_read
- the read marker.As there's no generic API for setting a similar
m.pinned_messages.fully_read
or whatever, this would require server-side changes.But if we assume that the TS on the events are accurate and comparable (which they probably are), then sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m.fully_read
doesn't seem to appear in the spec at all. Is it something that already exists or is that part of the server-side implementation request?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah.. then you probably want this https://docs.google.com/document/d/1UWqdS-e1sdwkLDUY0wA4gZyIkRp-ekjsLZ8k6g_Zvso/edit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(which is matrix-org/matrix-spec-proposals#910)
I'll take a look and give it a shot I suppose.