matrix-org / matrix-org/matrix-spec

set_presence wording is unclear

Open
#1,609 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

clarification
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

Link to problem area:

Issue

From the second link:

https://github.com/matrix-org/matrix-spec/blob/8b51f1c0110384a970b777afdc11d76b17f4e97d/content/client-server-api/modules/presence.md?plain=1#L17-L25

This makes it sound like presence is a three-valued enum.

From the first link:

https://github.com/matrix-org/matrix-spec/blob/45b6aaf07ae119a0e284192d6de8a13cf668d06f/data/api/client-server/sync.yaml#L91-L105

This describes three query parameter key-values pairs: set_presence=online, set_presence=offline, and set_presence=unavilable. The wording for offline is particularly confusing:

Otherwise if the parameter is set to "offline" then the client is not marked as being online when it uses this API.

This sounds like set_presence=offline is effectively a no-op that doesn't alter the current present state of the user.

It is hard to reconcile these two views. I see two possibilities:

  1. set_presence=offline really does set your presence state to offline. If this is true,
  2. set_presence=offline is a no-op on your presence state. If this is true,
    • the query parameter name is misleading here,
    • the description of set_presence is slightly confusing, and
    • there is no way to set your presence state to offline using /sync.

Both options seem confusing and inconsistent.

I would like to understand which of these is true and update the spec to make this clearer.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with content/client-server-api/modules/presence.md lines 17-25 and data/api/client-server/sync.yaml lines 91-105, then compare the cited Matrix client-server API sections. Resolve the intended semantics of set_presence=offline and update both descriptions so they state the behavior consistently. Done means the enum wording, parameter documentation, and offline behavior no longer conflict.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.