From 0695060d4d08ffb7612e35185a95a11db648ec33 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Wed, 10 Feb 2021 12:04:36 +0100 Subject: protocol: Version 4: sendat --- protocol.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/protocol.md b/protocol.md index 5951f11..5b260e7 100644 --- a/protocol.md +++ b/protocol.md @@ -1,4 +1,4 @@ -# tomsg protocol (version 3) +# tomsg protocol (version 4) The underlying transport of the protocol is a plain TCP socket. However, because private information is communicated, the recommended transport is an @@ -167,6 +167,24 @@ tomsg server. Also marks the current session as active. + The returned `number` response contains the message id of the message sent. + This number will be non-negative. + - Returns `number` or `error`. +- ` sendat ` + - Inserts a message in the history of the given room at the given timestamp. + `roomname`, `replymsgid` and `message` are as in the `send` command; if + `replymsgid` is not -1, the referred-to message must be in the same room + and have a timestamp that is earlier than `timestamp`. Note that negative + timestamps are not valid for `sendat`. + + All room members receive a `_push message` push message on all their + sessions (except the session the `send` message was sent from). Contrary to + `send`, the current session is _not_ marked active. + + The `apikey` argument is a value whose interpretation is + implementation-defined. The intention is to restrict usage of this command + to known-to-be well-behaving clients. + The returned `number` response contains the message id of the message sent. This number will be non-negative. - Returns `number` or `error`. -- cgit v1.2.3