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

Pan strips out reply/edit metadata #73

Closed
Half-Shot opened this issue Oct 29, 2020 · 1 comment · Fixed by matrix-nio/matrix-nio#220
Closed

Pan strips out reply/edit metadata #73

Half-Shot opened this issue Oct 29, 2020 · 1 comment · Fixed by matrix-nio/matrix-nio#220
Labels
bug Something isn't working

Comments

@Half-Shot
Copy link
Contributor

Half-Shot commented Oct 29, 2020

This is because m.relates_to is inside content, but not part of the ciphertext. E.g.

This is an example of a edit event sent from Element:

{
  "type": "m.room.encrypted",
  "sender": "@will:beefy",
  "content": {
    "algorithm": "m.megolm.v1.aes-sha2",
    "sender_key": "4tnx7225op7yzAfKxNBAJ9bJGvms0jLzEoVeunmpHA0",
    "ciphertext": "AwgHErABBUryOinjWfNqyrJy/P3Zbm+8nfFdCEeJVNCtdlfhdeeA1hhrHDN5N+/teE2PfLtm9iqSg2iEhkZu5rEOKKurwAgJiH5QsMBz0BOmVlle/tSmqbSA9S7JJM1xkCW9hIMoXppenJWAhIVDM6WPQi3kcwqZlxCTv2KcR61mYcTlX/We+206wLR6Rw9M4gY51M4VtWmMQaCTO23NoIxzParSGeS5a4MIfBwczv+PtOll/fnJzsGesZIOe9ZmdC5AHV7iy3cf62p6RhODTZaYWLqR4rdk6+BN/R7SAzgG8GyZCSXTaK95oGNeC3GGiIshlCColT4HhCYKSQA",
    "session_id": "Q7cwgfuBo2gwarsGHNSx484S50K6CKtSAb53qp3FOmQ",
    "device_id": "OVLSFSUAGP",
    "m.relates_to": {
      "rel_type": "m.replace",
      "event_id": "$i4Lghwml7imA5Ir7EY0Eln8Zt4i6fqZifiLlP5Pz2Vs"
    }
  },
  "origin_server_ts": 1603975928937,
  "unsigned": {
    "age": 26,
    "transaction_id": "m1603975928883.9"
  },
  "event_id": "$62WOwQXE2pCn68ZLA4o6pKZWnoBjniknXyoQNtbblTQ",
  "room_id": "!cDbbaoQeSQwVmvDGoQ:beefy"
}

This is how it arrives from pan:

{
  "type": "m.room.message",
  "sender": "@will:beefy",
  "content": {
    "m.new_content": {
      "msgtype": "m.text",
      "body": "foobar"
    },
    "msgtype": "m.text",
    "body": " * foobar"
  },
  "origin_server_ts": 1603976249057,
  "unsigned": {
    "age": 23
  },
  "event_id": "$62WOwQXE2pCn68ZLA4o6pKZWnoBjniknXyoQNtbblTQ",
  "room_id": "!cDbbaoQeSQwVmvDGoQ:beefy",
  "decrypted": true,
  "verified": false
}
@Half-Shot Half-Shot added the bug Something isn't working label Oct 29, 2020
@Half-Shot Half-Shot changed the title Pan strips out reply/edit/reaction metadata Pan strips out reply/edit metadata Oct 29, 2020
@tulir
Copy link
Member

tulir commented Oct 29, 2020

We should just put relations inside ciphertext too (matrix-org/matrix-spec-proposals#2674 (comment))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants