Implement tags into user data propogation event on channels
This commit is contained in:
parent
1abaea06fa
commit
c94069bb37
|
@ -9,6 +9,7 @@ import {
|
|||
IChannelInfo,
|
||||
Notification,
|
||||
UserFlags,
|
||||
Tag,
|
||||
} from "../util/types";
|
||||
import type { Socket } from "../ws/Socket";
|
||||
import { validateChannelSettings } from "./settings";
|
||||
|
@ -280,7 +281,8 @@ export class Channel extends EventEmitter {
|
|||
color: p.color,
|
||||
id: p.id,
|
||||
x: x,
|
||||
y: y
|
||||
y: y,
|
||||
tag: usersConfig.enableTags ? p.tag : undefined
|
||||
}
|
||||
]
|
||||
);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { ChannelList } from "../../../../channel/ChannelList";
|
||||
import { readUser, updateUser } from "../../../../data/user";
|
||||
import { ServerEventListener } from "../../../../util/types";
|
||||
import { findSocketsByUserID } from "../../../Socket";
|
||||
|
@ -25,5 +26,9 @@ export const tag: ServerEventListener<"tag"> = {
|
|||
toUpdate.forEach(s => {
|
||||
s.setTag(msg.tag.text, msg.tag.color);
|
||||
});
|
||||
|
||||
for (const ch of ChannelList.getList()) {
|
||||
ch.emit("user data update", user);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue