Skip to content
This repository has been archived by the owner on Oct 17, 2019. It is now read-only.

Use m.fully_read to implement "Jump to first unread message" #211

Open
krombel opened this issue Jan 16, 2018 · 4 comments
Open

Use m.fully_read to implement "Jump to first unread message" #211

krombel opened this issue Jan 16, 2018 · 4 comments
Labels

Comments

@krombel
Copy link
Contributor

krombel commented Jan 16, 2018

Sync contains the following data which riot uses to identify what the latest read message is to implement "Jump to first unread message" and to eventually show a bar between read and unread messages when opening a room
That data is tracked user-only and independent of m.receipt.

Here a snippet:

{
    "rooms": {
        "join": {
            "!roomID123456:matrix.org": {
                "unread_notifications": {
                    "highlight_count": 0,
                    "notification_count": 0
                },
                "account_data": {
                    "events": [{
                        "content": {
                            "event_id": "$messageIDofLastReadMessage:matrix.org"
                        },
                    "type": "m.fully_read"
                    }]
                }
            }
        }
    }
}

Hint:
You have to allow m.fully_read as type in account_data for rooms in default_filter

@t3chguy
Copy link

t3chguy commented Jan 16, 2018

Riot doesn't use the RM (m.fully_read) for calculating number of unreads, it uses the Read Receipt

@t3chguy
Copy link

t3chguy commented Jan 16, 2018

the RM is used to Jump to first unread message. only.
image

@t3chguy
Copy link

t3chguy commented Jan 16, 2018

Relevant: element-hq/riot-meta#66

@krombel krombel changed the title Use m.fully_read for unread counts Use m.fully_read to implement "Jump to first unread message" Jan 16, 2018
@krombel
Copy link
Contributor Author

krombel commented Jan 16, 2018

I updated the description to match the real goal of m.fully_read

@mujx mujx added the feature label Jan 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants