mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
test
This commit is contained in:
1 parent
4e1d23fd57
commit
0714d30a6f
5 files changed
+111
-100
No files matched your search
+10
-2
@@ -500,7 +500,15 @@ export class Channel {
|
||||
* @returns {Function}
|
||||
*/
|
||||
onMessageUser(callback, user) {
|
||||
const oid = this.handler.observeUserMessagesChannel(user.id, this.channel, callback);
|
||||
const resolvedUserId = user?.id
|
||||
?? user?._id
|
||||
?? user?.user?.id
|
||||
?? null;
|
||||
const resolvedChannel = this.channel ?? null;
|
||||
if (!resolvedUserId || !resolvedChannel?.id) {
|
||||
return () => {};
|
||||
}
|
||||
const oid = this.handler.observeUserMessagesChannel(resolvedUserId, resolvedChannel, callback);
|
||||
return () => {
|
||||
this.handler.unobserveUserMessagesChannel(oid);
|
||||
};
|
||||
@@ -1235,4 +1243,4 @@ export class HelpCommand {
|
||||
|
||||
paginator.send();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user