From 87c6e3270dc2dd1fa887cf95f81365e9d3bb05df Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 20 May 2021 16:13:28 +0530 Subject: [PATCH] make a note about restricting channel creation to registered users --- lib/hk-util.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/hk-util.js b/lib/hk-util.js index 7c244c174..5a96970d0 100644 --- a/lib/hk-util.js +++ b/lib/hk-util.js @@ -701,6 +701,7 @@ const handleGetHistory = function (Env, Server, seq, userId, parsed) { } if (msgCount === 0 && !metadata_cache[channelName] && Server.channelContainsUser(channelName, userId)) { + // TODO this might be a good place to reject channel creation by anonymous users handleFirstMessage(Env, channelName, metadata); Server.send(userId, [0, HISTORY_KEEPER_ID, 'MSG', userId, JSON.stringify(metadata)]); }