mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 06:46:21 +00:00
xep-0308: Implement /correct to correct the last send message
So far the correction is sent. But the UI in Profanity itself is not updated. Also autocompletion for `/correct` with the last sent message is missing.
This commit is contained in:
@@ -2606,3 +2606,15 @@ stanza_create_avatar_retrieve_data_request(xmpp_ctx_t *ctx, const char *stanza_i
|
||||
|
||||
return iq;
|
||||
}
|
||||
|
||||
xmpp_stanza_t*
|
||||
stanza_attach_correction(xmpp_ctx_t *ctx, xmpp_stanza_t *stanza, const char *const replace_id)
|
||||
{
|
||||
xmpp_stanza_t *replace_stanza = xmpp_stanza_new(ctx);
|
||||
xmpp_stanza_set_name(replace_stanza, "replace");
|
||||
xmpp_stanza_set_id(replace_stanza, replace_id);
|
||||
xmpp_stanza_set_ns(replace_stanza, STANZA_NS_LAST_MESSAGE_CORRECTION);
|
||||
xmpp_stanza_add_child(stanza, replace_stanza);
|
||||
|
||||
return stanza;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user