fix: name for join

This commit is contained in:
cha0s 2020-07-26 17:31:20 -05:00
parent 0a657c02d7
commit eb46f3a591

View File

@ -35,7 +35,11 @@ export default function Chat() {
return;
}
if (!hasChannel && validateChannel(channel)) {
dispatch(submitJoin({channel: channel.toLowerCase(), id: user.id}));
dispatch(submitJoin({
channel: channel.toLowerCase(),
id: user.id,
name: '/r/anonymous' === channel.toLowerCase() ? 'anonymous' : user.redditUsername,
}));
}
if (hasChannel) {
window.document.title = `${channel} | reddichat`;