-
Notifications
You must be signed in to change notification settings - Fork 44
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
Replies without replied-to content in reply body #57
Comments
Hm, I don't know about this. The spec, in section 13.2.2.6.1 Rich replies, says that the reply event's body is supposed to include the fallback content, i.e. the quoted text. That would seem to suggest that the bot (or any other such client) is not behaving according to spec. In that case, I'd rather the misbehaving client be fixed than write workarounds in this client for bugs in other clients (to a reasonable extent, anyway--there will always be some bugs in other clients, and some workarounds will be needed, but I'd like to keep them to a minimum). |
I don't have the link handy, but a recent MSC proposal I saw would require not including the replied-to content in the reply body (in order to avoid leaks of message content to users who joined a room after a replied-to message was sent). So this may become the standard in the future. |
FYI, in a couple of hours, I came up with the following super-janky patch that supports rich replies when the room uses formatted body. It hasn't gotten a lot of testing though, and most of the meat is from m.image. I followed the following two parts of the matrix spec to implement it,
|
@Vizs Looks promising. It would be easier to review if it were a PR. :) |
I will do that once I finish up the support for plain text bodies as well. I posted it here in case if it will be of help to Someone(TM). |
* ement-room.el (ement-room--rich-reply-callback): Function to modify the message event when reply event is finally fetched. (ement-room--rich-reply-text, ement-room--rich-reply-html): Helper functions for formatting body text with no reply message. (ement-room--format-message-body): Use above to support rich replies. Closes alphapapa#57. Ref. https://spec.matrix.org/v1.4/client-server-api/#rich-replies
* ement-room.el (ement-room--rich-reply-callback): Function to modify the message event when reply event is finally fetched. (ement-room--rich-reply-text, ement-room--rich-reply-html): Helper functions for formatting body text with no reply message. (ement-room--format-message-body): Use above to support rich replies. Closes alphapapa#57. Ref. https://spec.matrix.org/v1.4/client-server-api/#rich-replies
* ement-room.el (ement-room--rich-reply-callback): Function to modify the message event when reply event is finally fetched. (ement-room--rich-reply-text, ement-room--rich-reply-html): Helper functions for formatting body text with no reply message. (ement-room--format-message-body): Use above to support rich replies. Closes alphapapa#57. Ref. https://spec.matrix.org/v1.4/client-server-api/#rich-replies
* ement-room.el (ement-room--rich-reply-callback): Function to modify the message event when reply event is finally fetched. (ement-room--rich-reply-text, ement-room--rich-reply-html): Helper functions for formatting body text with no reply message. (ement-room--format-message-body): Use above to support rich replies. Closes alphapapa#57. Ref. https://spec.matrix.org/v1.4/client-server-api/#rich-replies
* ement-room.el (ement-room--rich-reply-callback): Function to modify the message event when reply event is finally fetched. (ement-room--rich-reply-text, ement-room--rich-reply-html): Helper functions for formatting body text with no reply message. (ement-room--format-message-body): Use above to support rich replies. Closes alphapapa#57. Ref. https://spec.matrix.org/v1.4/client-server-api/#rich-replies
For future reference, in case this MSC is merged: matrix-org/matrix-spec-proposals#2781 |
* ement-room.el (ement-room--rich-reply-callback): Function to modify the message event when reply event is finally fetched. (ement-room--rich-reply-text, ement-room--rich-reply-html): Helper functions for formatting body text with no reply message. (ement-room--format-message-body): Use above to support rich replies. Closes alphapapa#57. Ref. https://spec.matrix.org/v1.4/client-server-api/#rich-replies
* ement-room.el (ement-room--rich-reply-callback): Function to modify the message event when reply event is finally fetched. (ement-room--rich-reply-text, ement-room--rich-reply-html): Helper functions for formatting body text with no reply message. (ement-room--format-message-body): Use above to support rich replies. Closes alphapapa#57. Ref. https://spec.matrix.org/v1.4/client-server-api/#rich-replies
* ement-room.el (ement-room--rich-reply-callback): Function to modify the message event when reply event is finally fetched. (ement-room--rich-reply-text, ement-room--rich-reply-html): Helper functions for formatting body text with no reply message. (ement-room--format-message-body): Use above to support rich replies. Closes alphapapa#57. Ref. https://spec.matrix.org/v1.4/client-server-api/#rich-replies
* ement-room.el (ement-room--rich-reply-callback): Function to modify the message event when reply event is finally fetched. (ement-room--rich-reply-text, ement-room--rich-reply-html): Helper functions for formatting body text with no reply message. (ement-room--format-message-body): Use above to support rich replies. Closes alphapapa#57. Ref. https://spec.matrix.org/v1.4/client-server-api/#rich-replies
* ement-room.el (ement-room--rich-reply-callback): Function to modify the message event when reply event is finally fetched. (ement-room--rich-reply-text, ement-room--rich-reply-html): Helper functions for formatting body text with no reply message. (ement-room--format-message-body): Use above to support rich replies. Closes alphapapa#57. Ref. https://spec.matrix.org/v1.4/client-server-api/#rich-replies
Some clients don't have the replied to message in body or format_body fields. So one has to rely on the event_id cited in m.relates_to->m.in_reply_to. Example of such an event is (I stripped out the id),
This is from the t2bot bridging a discord channel and a matrix room.
I can take a stab at implementing this on May.
The text was updated successfully, but these errors were encountered: