aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-07-28 16:05:57 +0200
committerTom Smeding <tom.smeding@gmail.com>2020-07-28 16:07:43 +0200
commita9413077b5839b98fc791fcadbae4f8fa1c3743f (patch)
tree5ebece467f69883470b5ff60d89df5a974ccb2db
parente21ad3a5aa46635db9dc30b3395aa59588074932 (diff)
protocol: Add get_message command for use with replies
-rw-r--r--protocol.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/protocol.md b/protocol.md
index 8c02017..8bbba49 100644
--- a/protocol.md
+++ b/protocol.md
@@ -63,6 +63,10 @@ A _response_ from the server will be in one of the following forms:
the UNIX epoch. The reply message id is -1 if the message is a normal
message, or nonnegative if it is a reply to the referenced message in the
same room.
+- `<tag> message <roomname:word> <user:word> <timestamp:i64> <msgid:i64> <replymsgid:i64> <message:string...>`
+ - Response to the client's `get_message` command. This contains the
+ information for a single message, as in `_push message` and the
+ `history_message` response.
A command is identified by its name, which can be found in the list below. Its
arguments are zero or more words, except if for the command in question the last
@@ -152,6 +156,9 @@ tomsg server.
- Same as `history`, except the returned messages are the last `<number>`
strictly before the timestamp of the message with id `<msgid>`.
- Returns `history`, followed by zero or more `history_message`.
+- `<tag> get_message <msgid:i64>`
+ - Retrieves the message with the given id.
+ - Returns `message` or `error`.
- `<tag> ping`
- Asks for a `pong` response.
- Returns `pong`.