aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db.h2
-rw-r--r--protocol.md8
2 files changed, 5 insertions, 5 deletions
diff --git a/db.h b/db.h
index 8d618b4..d1c105b 100644
--- a/db.h
+++ b/db.h
@@ -60,7 +60,7 @@ bool db_add_token(i64 userid,const char *token);
bool db_delete_token(i64 userid,const char *token);
i64 db_create_message(i64 roomid,i64 userid,i64 timestamp,const char *message); // returns msgid
-struct db_message_list db_get_messages(i64 roomid,i64 count); // gets latest `count` messages
+struct db_message_list db_get_messages(i64 roomid,i64 count); // gets latest `count` messages in rev. chron. order
// if beforeid<0, same as db_get_messages
struct db_message_list db_get_messages_before(i64 roomid,i64 count,i64 beforeid);
diff --git a/protocol.md b/protocol.md
index 346bfe4..ac8d86a 100644
--- a/protocol.md
+++ b/protocol.md
@@ -55,11 +55,11 @@ A _response_ from the server will be in one of the following forms:
- `<tag> history <count:i64>`
- Response to the client's `history` command; is followed by exactly `<count>`
messages of type `history_message` with the same tag. The messages are
- returned in reverse chronological order (newest first).
+ returned in chronological order (oldest first).
- `<tag> history_message <index:i64> <roomname:word> <user:word> <timestamp:i64> <msgid:i64> <message:string...>`
- Part of the response to the client's `history` command. Index 0 is the
- newest message; index (`<count>` - 1) (from the `history` response) is the
- oldest message in the fragment requested. Timestamps are microseconds since
+ oldest message; index (`<count>` - 1) (from the `history` response) is the
+ newest message in the fragment requested. Timestamps are microseconds since
the UNIX epoch. The message id for each message is globally unique for the
entire server.
@@ -136,7 +136,7 @@ ranges until the end of the line).
member of the room. In the `history` response, `<count>` will be at most
`<number>`, and may be less if the room does not yet have `<number>`
messages. Each message will be returned in a `history_message` response
- after the `history` response, in reverse chronological order.
+ after the `history` response, in chronological order.
- Returns `history`, followed by zero or more `history_message`.
- `<tag> history_before <roomname:word> <number:i64> <msgid:i64>`
- Same as `history`, except the returned messages are the last `<number>`