aboutsummaryrefslogtreecommitdiff
path: root/db.h
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-07-28 16:05:47 +0200
committerTom Smeding <tom.smeding@gmail.com>2020-07-28 16:07:43 +0200
commit1d28744e532ac73ddff0c6fa829949497b25d4b6 (patch)
tree78cf2b126a75b39dc5a98b6bde5f0a7eb2e2c8ec /db.h
parenta9413077b5839b98fc791fcadbae4f8fa1c3743f (diff)
server: Implement get_message
Diffstat (limited to 'db.h')
-rw-r--r--db.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/db.h b/db.h
index 13df899..73d275a 100644
--- a/db.h
+++ b/db.h
@@ -64,10 +64,11 @@ i64 db_create_message(i64 roomid,i64 userid,i64 timestamp,i64 replyid,const char
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);
-bool db_message_exists(i64 roomid,i64 msgid);
+struct db_message db_get_message(i64 msgid); // returns {msgid=-1} if nonexistent
void db_nullify_name_id(struct db_name_id ni);
void db_nullify_room_list(struct db_room_list rl);
void db_nullify_user_list(struct db_user_list ul);
+void db_nullify_message(struct db_message ml);
void db_nullify_message_list(struct db_message_list ml);
void db_nullify_strings_list(struct db_strings_list sl);