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) {
|
if (result[0].affectedRows == 1) {
|
||||||
for (const client of clients) {
|
for (const client of clients) {
|
||||||
const info = clientInfo.find(
|
if (!clientInfo.some(clientInfo => clientInfo.Id === client.id))
|
||||||
clientInfo => clientInfo.Id === client.id
|
return
|
||||||
)
|
|
||||||
if (!info || info.SceneName != 'ChatroomMenu') continue
|
|
||||||
client.send(
|
client.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
for: message.type + ':' + message.kind,
|
for: message.type + ':' + message.kind,
|
||||||
@@ -634,10 +632,8 @@ app.ws('/ws', {
|
|||||||
|
|
||||||
if (!chatRows.reverse()[0])
|
if (!chatRows.reverse()[0])
|
||||||
for (const client of clients) {
|
for (const client of clients) {
|
||||||
const info = clientInfo.find(
|
if (!clientInfo.some(clientInfo => clientInfo.Id === client.id))
|
||||||
clientInfo => clientInfo.Id === client.id
|
return
|
||||||
)
|
|
||||||
if (!info || info.SceneName != 'ChatroomMenu') continue
|
|
||||||
client.send(
|
client.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
for: message.type + ':' + message.kind,
|
for: message.type + ':' + message.kind,
|
||||||
@@ -684,10 +680,8 @@ app.ws('/ws', {
|
|||||||
let savedata = JSON.parse(userData[0].saveData)
|
let savedata = JSON.parse(userData[0].saveData)
|
||||||
|
|
||||||
for (const client of clients) {
|
for (const client of clients) {
|
||||||
const info = clientInfo.find(
|
if (!clientInfo.some(clientInfo => clientInfo.Id === client.id))
|
||||||
clientInfo => clientInfo.Id === client.id
|
return
|
||||||
)
|
|
||||||
if (!info || info.SceneName != 'ChatroomMenu') continue
|
|
||||||
client.send(
|
client.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
for: message.type + ':' + message.kind,
|
for: message.type + ':' + message.kind,
|
||||||
@@ -793,10 +787,8 @@ app.ws('/ws', {
|
|||||||
let savedata = JSON.parse(userData[0].saveData)
|
let savedata = JSON.parse(userData[0].saveData)
|
||||||
|
|
||||||
for (const client of clients) {
|
for (const client of clients) {
|
||||||
const info = clientInfo.find(
|
if (!clientInfo.some(clientInfo => clientInfo.Id === client.id))
|
||||||
clientInfo => clientInfo.Id === client.id
|
return
|
||||||
)
|
|
||||||
if (!info || info.SceneName != 'ChatroomMenu') continue
|
|
||||||
client.send(
|
client.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
for: message.type + ':' + message.kind,
|
for: message.type + ':' + message.kind,
|
||||||
|
|||||||
Reference in new issue
Block a user