This repository was archived by the owner on Apr 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Quotation depth is too much in bridged threaded messagesΒ #122
Copy link
Copy link
Open
Description
At now bridge seems includes as quotation text from all previous replies to message text in thread, as result those messages look ugly on Element-Android, here is issue about this: element-hq/element-android#3460
But the source of this problem is too much quotation of mx-puppet-slack.
Here is exact example of message, here is the source:
{
"type": "m.room.message",
"sender": "@_slackpuppet___t02_f_l_v1_h_n=2d_u01_r_x635_e2_j:ru-matrix.org",
"content": {
"msgtype": "m.text",
"body": "> <@_slackpuppet___t02_f_l_v1_h_n=2d_u015_d_s_p30_n_l:ru-matrix.org> > <@_slackpuppet___t02_f_l_v1_h_n=2d_u0220_r5_p16_z:ru-matrix.org> > <@_slackpuppet___t02_f_l_v1_h_n=2d_u0220_r5_p16_z:ru-matrix.org> > <@_slackpuppet___t02_f_l_v1_h_n=2d_u015_d_s_p30_n_l:ru-matrix.org> > <@_slackpuppet___t02_f_l_v1_h_n=2d_u015_d_s_p30_n_l:ru-matrix.org> > <@_slackpuppet___t02_f_l_v1_h_n=2d_u0220_r5_p16_z:ru-matrix.org> > <@_slackpuppet___t02_f_l_v1_h_n=2d_u015_d_s_p30_n_l:ru-matrix.org> > <@_slackpuppet___t02_f_l_v1_h_n=2d_u015_d_s_p30_n_l:ru-matrix.org> <https://github.com/vercel/nextjs-subscription-payments>\n> > > > > > > \n> > > > > > > I rewrote the code using Prisma and now rewriting it using Keystone\n> > > > > > \n> > > > > > Ah that's really helpful, thank you both! I think it's more to do with mounting a custom endpoint on the Keystone server that I haven't been able to get around; I did a similar think with `app.use('/webhook/stripe')` on a custom server in a K5 project but haven't got that working in Next yet. If I manage to do it, I'll throw together an example repo with a generic webhook example\n> > > > > \n> > > > > You could use the next-lite example\n> > > > \n> > > > And in your pages folder, add api/webhooks\n> > > \n> > > Thinking that as a stop-gap I could use Next API routes to take untyped JSON from a webhook and transform that into a GraphQL query to communicate with Keystone to avoid a custom server if that's not possible in K6\n> > \n> > That's super useful, thank you!\n> \n> No problem! Let me know if you have anymore questions\n\njunaidkabani3 thanks so much for sharing what you've learned! πββοΈ π\n\nHope next steps are productive dan.w π π€",
"format": "org.matrix.custom.html",
"formatted_body": "<mx-reply><blockquote>\n\t<a href=\"https://matrix.to/#/!AkMxTNaaaxjawWEjiO:ru-matrix.org/$XnJFHuBAWpFAOn8SH3nNK0Xll3XC9eqxSWhOJsLYvtA\">In reply to</a>\n\t<a href=\"https://matrix.to/#/@_slackpuppet___t02_f_l_v1_h_n=2d_u015_d_s_p30_n_l:ru-matrix.org\">@_slackpuppet___t02_f_l_v1_h_n=2d_u015_d_s_p30_n_l:ru-matrix.org</a>\n\t<br><p>No problem! Let me know if you have anymore questions</p>\n</blockquote></mx-reply><p><a href=\"https://matrix.to/#/@_slackpuppet___t02_f_l_v1_h_n=2d_u015_d_s_p30_n_l:ru-matrix.org\">junaidkabani3</a> thanks so much for sharing what you've learned! πββοΈ π<br><br>Hope next steps are productive <a href=\"https://matrix.to/#/@_slackpuppet___t02_f_l_v1_h_n=2d_u0220_r5_p16_z:ru-matrix.org\">dan.w</a> π π€</p>",
"source": "slack",
"m.relates_to": {
"m.in_reply_to": {
"event_id": "$XnJFHuBAWpFAOn8SH3nNK0Xll3XC9eqxSWhOJsLYvtA"
}
},
"external_url": "https://keystonejs.slack.com/archives/C01STDMEW3S/p1622707081.340700"
},
"origin_server_ts": 1622707081145,
"unsigned": {
"age": 69181602
},
"event_id": "$R6jn3jF72Ui86X1awuI2F5ahgINzvYVCa-mEsRQcHMQ",
"room_id": "!AkMxTNaaaxjawWEjiO:ru-matrix.org"
}
And screenshot from Element-Web:

And from Android:

I think that quotation depth of one previous message will be enough.
But let make this depth configurable?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels