m->d: Replying to an emoji shows "undefined" as reply preview #27

Closed
opened 2024-01-13 10:03:57 +00:00 by cadence · 1 comment
Owner

Original event with emoji:

{
  "type": "m.room.message",
  "sender": "@cadence:cadence.moe",
  "content": {
    "msgtype": "m.text",
    "body": ":hippo:",
    "format": "org.matrix.custom.html",
    "formatted_body": "<img data-mx-emoticon height=\"32\" src=\"mxc://cadence.moe/AHKNeXoRlprdULRMalhqfCdj\" title=\":hippo:\" alt=\":hippo:\">"
  },
  "origin_server_ts": 1705140106838,
  "unsigned": {
    "age": 52,
    "transaction_id": "m1705140106752.1398"
  },
  "event_id": "$zmO-dtPO6FubBkDxJZ5YmutPIsG1RgV5JJku-9LeGWs",
  "room_id": "!TqlyQmifxGUggEmdBN:cadence.moe"
}

(this emoji exists on discord side)

Reply event:

{
  "type": "m.room.message",
  "sender": "@cadence:cadence.moe",
  "content": {
    "msgtype": "m.text",
    "body": "> <@cadence:cadence.moe> :hippo:\n\nreply",
    "format": "org.matrix.custom.html",
    "formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!TqlyQmifxGUggEmdBN:cadence.moe/$zmO-dtPO6FubBkDxJZ5YmutPIsG1RgV5JJku-9LeGWs?via=cadence.moe&via=matrix.org&via=conduit.rory.gay\">In reply to</a> <a href=\"https://matrix.to/#/@cadence:cadence.moe\">@cadence:cadence.moe</a><br><img data-mx-emoticon height=\"32\" src=\"mxc://cadence.moe/AHKNeXoRlprdULRMalhqfCdj\" title=\":hippo:\" alt=\":hippo:\" /></blockquote></mx-reply>reply",
    "m.relates_to": {
      "m.in_reply_to": {
        "event_id": "$zmO-dtPO6FubBkDxJZ5YmutPIsG1RgV5JJku-9LeGWs"
      }
    }
  },
  "origin_server_ts": 1705140116773,
  "unsigned": {
    "age": 170,
    "transaction_id": "m1705140116674.1399"
  },
  "event_id": "$bCMLaLiMfoRajaGTgzaxAci-g8hJfkspVJIKwYktnvc",
  "room_id": "!TqlyQmifxGUggEmdBN:cadence.moe"
}

The reply preview on Discord just says "undefined". Instead, it should include the emoji (if available) or the shortcode.

Original event with emoji: ``` { "type": "m.room.message", "sender": "@cadence:cadence.moe", "content": { "msgtype": "m.text", "body": ":hippo:", "format": "org.matrix.custom.html", "formatted_body": "<img data-mx-emoticon height=\"32\" src=\"mxc://cadence.moe/AHKNeXoRlprdULRMalhqfCdj\" title=\":hippo:\" alt=\":hippo:\">" }, "origin_server_ts": 1705140106838, "unsigned": { "age": 52, "transaction_id": "m1705140106752.1398" }, "event_id": "$zmO-dtPO6FubBkDxJZ5YmutPIsG1RgV5JJku-9LeGWs", "room_id": "!TqlyQmifxGUggEmdBN:cadence.moe" } ``` (this emoji exists on discord side) Reply event: ``` { "type": "m.room.message", "sender": "@cadence:cadence.moe", "content": { "msgtype": "m.text", "body": "> <@cadence:cadence.moe> :hippo:\n\nreply", "format": "org.matrix.custom.html", "formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!TqlyQmifxGUggEmdBN:cadence.moe/$zmO-dtPO6FubBkDxJZ5YmutPIsG1RgV5JJku-9LeGWs?via=cadence.moe&via=matrix.org&via=conduit.rory.gay\">In reply to</a> <a href=\"https://matrix.to/#/@cadence:cadence.moe\">@cadence:cadence.moe</a><br><img data-mx-emoticon height=\"32\" src=\"mxc://cadence.moe/AHKNeXoRlprdULRMalhqfCdj\" title=\":hippo:\" alt=\":hippo:\" /></blockquote></mx-reply>reply", "m.relates_to": { "m.in_reply_to": { "event_id": "$zmO-dtPO6FubBkDxJZ5YmutPIsG1RgV5JJku-9LeGWs" } } }, "origin_server_ts": 1705140116773, "unsigned": { "age": 170, "transaction_id": "m1705140116674.1399" }, "event_id": "$bCMLaLiMfoRajaGTgzaxAci-g8hJfkspVJIKwYktnvc", "room_id": "!TqlyQmifxGUggEmdBN:cadence.moe" } ``` The reply preview on Discord just says "undefined". Instead, it should include the emoji (if available) or the shortcode.
cadence added this to the v2.0 milestone 2024-02-13 20:05:26 +00:00
Author
Owner

Fixed in 369e0862e5

Fixed in 369e0862e52709d4f8ab9618ba66b84e1713c555
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: cadence/out-of-your-element#27
No description provided.