Revert "If user isn't in chatroom menu, don't send chatroom events"
This reverts commit c65974ff43.
This commit is contained in:
1 file changed
+8
-16
+8
-16
@@ -555,10 +555,8 @@ app.ws('/ws', {
|
||||
|
||||
if (result[0].affectedRows == 1) {
|
||||
for (const client of clients) {
|
||||
const info = clientInfo.find(
|
||||
clientInfo => clientInfo.Id === client.id
|
||||
)
|
||||
if (!info || info.SceneName != 'ChatroomMenu') continue
|
||||
if (!clientInfo.some(clientInfo => clientInfo.Id === client.id))
|
||||
return
|
||||
client.send(
|
||||
JSON.stringify({
|
||||
for: message.type + ':' + message.kind,
|
||||
@@ -634,10 +632,8 @@ app.ws('/ws', {
|
||||
|
||||
if (!chatRows.reverse()[0])
|
||||
for (const client of clients) {
|
||||
const info = clientInfo.find(
|
||||
clientInfo => clientInfo.Id === client.id
|
||||
)
|
||||
if (!info || info.SceneName != 'ChatroomMenu') continue
|
||||
if (!clientInfo.some(clientInfo => clientInfo.Id === client.id))
|
||||
return
|
||||
client.send(
|
||||
JSON.stringify({
|
||||
for: message.type + ':' + message.kind,
|
||||
@@ -684,10 +680,8 @@ app.ws('/ws', {
|
||||
let savedata = JSON.parse(userData[0].saveData)
|
||||
|
||||
for (const client of clients) {
|
||||
const info = clientInfo.find(
|
||||
clientInfo => clientInfo.Id === client.id
|
||||
)
|
||||
if (!info || info.SceneName != 'ChatroomMenu') continue
|
||||
if (!clientInfo.some(clientInfo => clientInfo.Id === client.id))
|
||||
return
|
||||
client.send(
|
||||
JSON.stringify({
|
||||
for: message.type + ':' + message.kind,
|
||||
@@ -793,10 +787,8 @@ app.ws('/ws', {
|
||||
let savedata = JSON.parse(userData[0].saveData)
|
||||
|
||||
for (const client of clients) {
|
||||
const info = clientInfo.find(
|
||||
clientInfo => clientInfo.Id === client.id
|
||||
)
|
||||
if (!info || info.SceneName != 'ChatroomMenu') continue
|
||||
if (!clientInfo.some(clientInfo => clientInfo.Id === client.id))
|
||||
return
|
||||
client.send(
|
||||
JSON.stringify({
|
||||
for: message.type + ':' + message.kind,
|
||||
|
||||
Reference in new issue
Block a user