decord/source/modules/applications/ApplicationPresenceUtils.tsx

22 lines
737 B
TypeScript
Raw Normal View History

// Module ID: 8257
// Function ID: 8258
// Name: ApplicationPresenceUtils
// Dependencies: [1957, 2]
2026-07-20 16:05:17 +00:00
// Exports: shouldDisableUserPresenceInChannel
// Module 8257 (ApplicationPresenceUtils)
import ChannelStore from "ChannelStore" /* 1957 */;
2026-07-23 10:11:24 +00:00
const size = fn(2);
const result = size.fileFinishedImporting("modules/applications/ApplicationPresenceUtils.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const shouldDisableUserPresenceInChannel = function shouldDisableUserPresenceInChannel(bot, channelId) {
const channel = ChannelStore.getChannel(channelId);
2026-07-29 08:29:29 +00:00
let tmp = null != channel && bot.bot && channel.isPrivate();
2026-07-20 16:05:17 +00:00
if (tmp) {
const rawRecipients = channel.rawRecipients;
2026-07-29 08:29:29 +00:00
tmp = null == rawRecipients.find((id) => id.id === bot.id);
2026-07-20 16:05:17 +00:00
}
return tmp;
};