|
|
@ -701,6 +701,7 @@ const handleGetHistory = function (Env, Server, seq, userId, parsed) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (msgCount === 0 && !metadata_cache[channelName] && Server.channelContainsUser(channelName, userId)) {
|
|
|
|
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);
|
|
|
|
handleFirstMessage(Env, channelName, metadata);
|
|
|
|
Server.send(userId, [0, HISTORY_KEEPER_ID, 'MSG', userId, JSON.stringify(metadata)]);
|
|
|
|
Server.send(userId, [0, HISTORY_KEEPER_ID, 'MSG', userId, JSON.stringify(metadata)]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|