Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presence list API response does not match m.presence schema #2065

Closed
jimmycuadra opened this issue Jun 2, 2019 · 1 comment
Closed

Presence list API response does not match m.presence schema #2065

jimmycuadra opened this issue Jun 2, 2019 · 1 comment

Comments

@jimmycuadra
Copy link
Contributor

In r0.4.0 of the client-server spec, the schema of the m.presence event is shown as:

{
    "content": {
        "avatar_url": "mxc://localhost:wefuiwegh8742w",
        "currently_active": false,
        "last_active_ago": 2478593,
        "presence": "online"
    },
    "sender": "@example:localhost",
    "type": "m.presence"
}

However, the response of the presence list API is shown with a different structure for the event:

[
  {
    "content": {
      "last_active_ago": 395,
      "presence": "offline",
      "user_id": "@alice:matrix.org"
    },
    "type": "m.presence"
  },
  {
    "content": {
      "last_active_ago": 16874,
      "presence": "online",
      "user_id": "@marisa:matrix.org",
      "currently_active": true
    },
    "type": "m.presence"
  }
]

I think the latter is wrong and from an older version of the spec before "user_id" was changed to "sender". Notice that "user_id" is inside the "content" object in the API response whereas "sender" is in the top-level object in the event. "avatar_url" is also missing in the API response.

@turt2live
Copy link
Member

Presence lists were removed: #1819

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants