aboutsummaryrefslogtreecommitdiff
path: root/db.h
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2021-02-27 17:39:46 +0100
committerTom Smeding <tom@tomsmeding.com>2021-02-27 17:49:10 +0100
commit1e1cd7ce0aa362a0a2a20a764145035be911673d (patch)
treed4a4860c90a8bc408954871ff55c441dad543cd0 /db.h
parente7a188d9f8cd105485c5362f525cdd614c03dd3c (diff)
server: Restrict is_online to only query users you know about
Diffstat (limited to 'db.h')
-rw-r--r--db.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/db.h b/db.h
index 73d275a..8c545ad 100644
--- a/db.h
+++ b/db.h
@@ -59,6 +59,7 @@ i64 db_find_user(const char *name); // -1 if not found
struct db_strings_list db_user_tokens(i64 userid);
bool db_add_token(i64 userid,const char *token);
bool db_delete_token(i64 userid,const char *token);
+bool db_user_knows_user(i64 userid1,i64 userid2); // both users have a common room
i64 db_create_message(i64 roomid,i64 userid,i64 timestamp,i64 replyid,const char *message); // returns msgid
struct db_message_list db_get_messages(i64 roomid,i64 count); // gets latest `count` messages in rev. chron. order