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:
Michael Vetter
2020-02-10 16:17:01 +01:00
parent 83b61e5160
commit 1118110071
13 changed files with 132 additions and 11 deletions

View File

@@ -259,8 +259,7 @@ message_pubsub_event_handler_add(const char *const node, ProfMessageCallback fun
}
char*
message_send_chat(const char *const barejid, const char *const msg, const char *const oob_url,
gboolean request_receipt)
message_send_chat(const char *const barejid, const char *const msg, const char *const oob_url, gboolean request_receipt, const char *const replace_id)
{
xmpp_ctx_t * const ctx = connection_get_ctx();
@@ -284,6 +283,10 @@ message_send_chat(const char *const barejid, const char *const msg, const char *
stanza_attach_receipt_request(ctx, message);
}
if (replace_id) {
stanza_attach_correction(ctx, message, replace_id);
}
_send_message_stanza(message);
xmpp_stanza_release(message);