From 9c7ddb4ac71e7b4bd298e20500ef66f58db6d329 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 28 Jul 2020 20:06:57 +0200 Subject: clientlib: Update to protocol version 2 with replies --- ssh/tomsg_clientlib.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ssh/tomsg_clientlib.h') diff --git a/ssh/tomsg_clientlib.h b/ssh/tomsg_clientlib.h index ab1bde5..b164eb3 100644 --- a/ssh/tomsg_clientlib.h +++ b/ssh/tomsg_clientlib.h @@ -139,6 +139,7 @@ struct history_message { char *username; int64_t timestamp; int64_t msgid; + int64_t replyid; // -1 if normal message, the replied-to message id otherwise char *message; }; @@ -245,8 +246,12 @@ enum tomsg_retval tomsg_invite( // If 'tag' is not NULL, will write the message request tag to the referenced // location. This tag will also be given in the TOMSG_EV_SEND response, so that // the response can be linked to the original message. +// If 'replyid' is -1, will send a normal message. If not, it must be the id of +// an earlier message in the same room, and this will send a reply to the +// indicated message. enum tomsg_retval tomsg_send( struct tomsg_client *client, const char *room_name, const char *message, + int64_t replyid, int64_t *tag // output ); -- cgit v1.2.3-54-g00ecf