Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Missing thread_id in m.receipt for events recieved over federation #14459

Closed
germain-gg opened this issue Nov 16, 2022 · 4 comments · Fixed by #14466
Closed

Missing thread_id in m.receipt for events recieved over federation #14459

germain-gg opened this issue Nov 16, 2022 · 4 comments · Fixed by #14466
Assignees
Labels
A-Threads Threaded messages O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@germain-gg
Copy link
Contributor

germain-gg commented Nov 16, 2022

Description

I simulated a conversation between two users in a thread. When a user sees the other party message, it will send a read receipt

POST https://matrix-client.matrix.org/_matrix/client/r0/rooms/[ROOM_ID]/receipt/m.read/[EVENT_ID]

With a body

{ "thread_id": THREAD_ROOT_ID }

When this is processed, the other user will receive the m.receipt event down /sync. However I notice that the thread_id that has been passed in the original request body is missing (highlighted in red below).

{
  "type": "m.receipt",
  "content": {
    "[EVENT_ID]": {
      "m.read": {
        "@germaingermain:matrix.org": {
          "ts": 1668591503180
-         "thread_id": THREAD_ROOT_ID
        }
      }
    }
  }
}

Steps to reproduce

  • Send a read receipt from one client
  • Inspect the sync response of the other party

The issue does not occur when the two users are using the threads dev server we have for internal testing.
However the issue seems to happen on matrix.org/element.io, I am unsure whether this happens only over federation or not

Homeserver

matrix.org

Synapse Version

1.71.0rc2

Installation Method

No response

Platform

n/a

Relevant log output

n/a

Anything else that would be useful to know?

No response

@clokep
Copy link
Member

clokep commented Nov 16, 2022

The issue does not occur when the two users are using the threads dev server we have for internal testing.
However the issue seems to happen on matrix.org/element.io, I am unsure whether this happens only over federation or not

Can you expand on this a bit -- are you only seeing the issue if the users are on different servers?

@clokep clokep self-assigned this Nov 16, 2022
@clokep clokep added S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. A-Threads Threaded messages O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Nov 16, 2022
@germain-gg
Copy link
Contributor Author

I'm unsure whether the issue is with federation, or whether the problem is only on matrix.org and element.io.
I do not have a good way to validate that.

What I can say is that the same Element Web client works when testing against the threads dev server we have, and is not working when inspecting what comes down /sync on my matrix.org account, or element.io account.

@clokep
Copy link
Member

clokep commented Nov 16, 2022

I'm unsure whether the issue is with federation, or whether the problem is only on matrix.org and element.io.
I do not have a good way to validate that.

From discussion with @gsouquet, this is seen with an account on matrix.org and one on element.io.

@clokep
Copy link
Member

clokep commented Nov 16, 2022

From investigating this it seems that we're not properly sending the thread ID information over federation. I'm not sure if this was just never implemented properly or if it got lost in the rebasing of work at some point. Sad times.

@clokep clokep added O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience and removed O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Nov 16, 2022
@clokep clokep changed the title Missing thread_id in m.receipt coming down /sync Missing thread_id in m.receipt for events recieved over federation Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Threads Threaded messages O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants