Fix matched channel ID joining bug

This commit is contained in:
Hri7566 2024-07-09 12:20:59 -04:00
parent 83bf5ad7e9
commit 3c9df73c63
2 changed files with 3 additions and 2 deletions

View File

@ -40,11 +40,9 @@ Brandon's server originally used MongoDB for storing user data, but there are to
## TODO ## TODO
- Fix chown
- Add configuration options - Add configuration options
- Notifications - Notifications
- Ratelimit everything - Ratelimit everything
- Test code for channel settings
- Implement both UUID-based and JWT-based token auth for fun - Implement both UUID-based and JWT-based token auth for fun
- Test tags - Test tags
- Test every frontend - Test every frontend

View File

@ -126,6 +126,9 @@ export class Socket extends EventEmitter {
public setChannel(_id: string, set?: Partial<IChannelSettings>) { public setChannel(_id: string, set?: Partial<IChannelSettings>) {
if (this.isDestroyed()) return; if (this.isDestroyed()) return;
const ch = this.getCurrentChannel();
if (ch && ch.getID() == _id) return;
this.desiredChannel._id = _id; this.desiredChannel._id = _id;
this.desiredChannel.set = set; this.desiredChannel.set = set;