iamb icon indicating copy to clipboard operation
iamb copied to clipboard

[Feature] Format mentions in outgoing messages

Open foxyseta opened this issue 1 year ago • 0 comments

From iamb-users:

Well, Element Web crafted this:

┌────────────────────────────────────────────────────────────────────┐
│ "content": {                                                       │
│    "body": "so if I try Full Name , what does the event            │
│look like?",                                                        │
│    "format": "org.matrix.custom.html",                             │
│    "formatted_body": "so if I try <a href=\"https://matrix.to/#/@  │
│user:server.net\">Full Name</a> , what does the                     │
│event look like?",                                                  │
│    "m.mentions": {                                                 │
│      "user_ids": [                                                 │
│        "@user:server.net"                                          │
│      ]                                                             │
│    },                                                              │
│    "msgtype": "m.text"                                             │
│  }                                                                 │
└────────────────────────────────────────────────────────────────────┘

While iamb crafted this:

┌────────────────────────────────────────────────────────────────────┐
│"content": {                                                        │
│    "body": "e.g. @user:server.net (you should see this message as  │
│not displayed correctly on clients other than iamb)",               │
│    "format": "org.matrix.custom.html",                             │
│    "formatted_body": "<p>e.g. @user:server.net (you should see this│
│ message as not displayed correctly on clients other than iamb)</p>\│
│n",                                                                 │
│    "msgtype": "m.text"                                             │
│  }                                                                 │
└────────────────────────────────────────────────────────────────────┘ 

two major differences here: the formatted body had an actual link in it and EW added m.mentions which iamb does not do. feature request, I guess interesting that EX did the extra work of spotting the mention and wrapping it in a pill

Given the lack of consistent support among clients, sticking to the centralized, domain-dependent https://matrix.to was recommended over the decentralized, domin-independent URI schema matrix:.

foxyseta avatar Feb 15 '25 01:02 foxyseta