diff options
author | Tom Smeding <tom@tomsmeding.com> | 2021-02-10 12:04:36 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2021-02-10 12:04:36 +0100 |
commit | 0695060d4d08ffb7612e35185a95a11db648ec33 (patch) | |
tree | e6e3712a7dfd6c2209f2cc387163aef54d31d3fe /protocol.md | |
parent | 8803632a5f9e36cc9a82b42bdc60280fc22a0270 (diff) |
protocol: Version 4: sendat
Diffstat (limited to 'protocol.md')
-rw-r--r-- | protocol.md | 20 |
1 files changed, 19 insertions, 1 deletions
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 @@ -170,6 +170,24 @@ tomsg server. The returned `number` response contains the message id of the message sent. This number will be non-negative. - Returns `number` or `error`. +- `<tag> sendat <apikey:word> <roomname:word> <replymsgid:i64> <timestamp:i64> <message:string...>` + - 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`. - `<tag> history <roomname:word> <number:i64>` - Requests the last `<number>` messages in the given room, if the client is a member of the room. In the `history` response, `<count>` will be at most |