matrix-org / gomatrix

A Golang Matrix client
Apache License 2.0
285 stars 53 forks source link

Reply support #55

Open ptman opened 6 years ago

ptman commented 6 years ago

Is this something gomatrix should provide? At least some

RelatesTo struct {
    InReplyTo struct {
        EventID string `json:"event_id"`
    } `json:"m.in_reply_to"`
} `json:"m.relates_to"`

members in the structs and maybe some GetHTMLMessage-style function to generate fallback-containing reply bodies?

TheDiscordian commented 4 years ago

Related to: r0.6.0#m-room-message-msgtypes

I think the best solution is to figure out if/how we want to process formatted_body. I think it should be processed, but I have no idea how in a neat, universal, idiomatic way.

Otherwise because mx-reply is very unique, and has a very strict scope, it might be worth treating this as a special case. I'm happy to do a PR to support something similar to the proposed structure, but I'd like thoughts on this.