Currently, when an XMPP message is edited, we get a new message with an edited flag, but since the bridge code is unaware of that, it forwards it up to Discord without any flag of sorts. aioxmpp got support for that edited flag but investigation is required to see how do we access that flag.
@vvvvvvivi told me that webhooks now support PATCH, and I can see other people in the Discord API server also talking about it, so it looks legit enough. There aren't any docs, but Mason confirmed the feature: append /messages/{message_id} and watch the magic happen.
Implementation details are dependent on how aioxmpp provides edit info to us. If it's just a flag, I'm not sure how we could do it, but if it provides the old message content, we could create an in-memory dict of (jid, content) => message_id, do a lookup, patch, delete old key, add new key.
Keep in mind this does not equate to supporting edited Discord messages back to XMPP.
Currently, when an XMPP message is edited, we get a new message with an edited flag, but since the bridge code is unaware of that, it forwards it up to Discord without any flag of sorts.
aioxmpp
got support for that edited flag but investigation is required to see how do we access that flag.@vvvvvvivi told me that webhooks now support
PATCH
, and I can see other people in the Discord API server also talking about it, so it looks legit enough. There aren't any docs, but Mason confirmed the feature: append/messages/{message_id}
and watch the magic happen.Implementation details are dependent on how aioxmpp provides edit info to us. If it's just a flag, I'm not sure how we could do it, but if it provides the old message content, we could create an in-memory dict of
(jid, content) => message_id
, do a lookup, patch, delete old key, add new key.Keep in mind this does not equate to supporting edited Discord messages back to XMPP.