decord/source/modules/self_mod/ChannelSafetyWarningsManager.tsx

103 lines
3.9 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 16076
// Function ID: 124401
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-27 11:26:19 +00:00
// Dependencies: [7, 6, 15, 17, 18, 1348, 1907, 10069, 10094, 16077, 5078, 2]
2026-07-20 16:05:17 +00:00
2026-07-27 11:26:19 +00:00
// Module 16076 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import InappropriateConversationExperiment from "InappropriateConversationExperiment";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import _inherits from "_inherits";
import closure_7 from "_isNativeReflectConstruct";
import closure_8 from "_isNativeReflectConstruct";
import tmp2 from "AutomaticLifecycleManager";
const require = arg1;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => {
}));
function _isNativeReflectConstruct() {
return closure_0;
}
const result = _isNativeReflectConstruct();
}
function handleChannelSelect(channelId) {
channelId = channelId.channelId;
if (null == channelId) {
return false;
} else {
let obj = { location: "channel_select" };
if (obj6.isEligibleForInappropriateConversationWarning(obj)) {
2026-07-25 08:10:48 +00:00
obj = require(10094) /* shouldShowTakeoverForWarnings */;
2026-07-20 16:05:17 +00:00
if (obj.getSafetyAlertsSettingOrDefault()) {
2026-07-23 10:11:24 +00:00
channel = channel.getChannel(channelId);
2026-07-20 16:05:17 +00:00
if (null != channel) {
if (channel.isDM()) {
2026-07-25 08:10:48 +00:00
const inappropriateConversationTakeoverForChannel = require(10094) /* shouldShowTakeoverForWarnings */.getInappropriateConversationTakeoverForChannel(channelId);
2026-07-20 16:05:17 +00:00
let flag3 = null != inappropriateConversationTakeoverForChannel;
if (flag3) {
obj = {};
({ id: obj5.warningId, type: obj5.warningType } = inappropriateConversationTakeoverForChannel);
obj.senderId = channel.getRecipientId();
obj.channelId = channelId;
2026-07-27 11:26:19 +00:00
require(16077) /* showTakeoverModal */.showTakeoverModal(obj);
2026-07-20 16:05:17 +00:00
flag3 = true;
2026-07-27 11:26:19 +00:00
const obj4 = require(16077) /* showTakeoverModal */;
2026-07-20 16:05:17 +00:00
}
return flag3;
}
}
return false;
} else {
return false;
}
} else {
return false;
}
2026-07-25 08:10:48 +00:00
obj6 = require(10069) /* InappropriateConversationExperiment */;
2026-07-20 16:05:17 +00:00
}
}
function handleChannelUpdates(channels) {
channels = channels.channels;
2026-07-23 10:11:24 +00:00
let currentlySelectedChannelId;
2026-07-25 08:10:48 +00:00
let obj = currentlySelectedChannelId(10069);
2026-07-20 16:05:17 +00:00
if (obj.isEligibleForInappropriateConversationWarning({ location: "channel_updates" })) {
if (obj2.getSafetyAlertsSettingOrDefault()) {
2026-07-23 10:11:24 +00:00
currentlySelectedChannelId = currentlySelectedChannelId.getCurrentlySelectedChannelId();
2026-07-20 16:05:17 +00:00
if (null == currentlySelectedChannelId) {
return false;
} else {
const found = channels.find((id) => id.id === currentlySelectedChannelId);
if (null == found) {
return false;
} else {
2026-07-25 08:10:48 +00:00
const inappropriateConversationTakeoverForChannel = currentlySelectedChannelId(10094).getInappropriateConversationTakeoverForChannel(found.id);
2026-07-20 16:05:17 +00:00
const tmp6 = null == inappropriateConversationTakeoverForChannel || !found.isDM();
let flag3 = !tmp6;
if (!tmp6) {
obj = {};
({ id: obj4.warningId, type: obj4.warningType } = inappropriateConversationTakeoverForChannel);
obj.senderId = found.getRecipientId();
obj.channelId = found.id;
2026-07-27 11:26:19 +00:00
currentlySelectedChannelId(16077).showTakeoverModal(obj);
2026-07-20 16:05:17 +00:00
flag3 = true;
2026-07-27 11:26:19 +00:00
const obj3 = currentlySelectedChannelId(16077);
2026-07-20 16:05:17 +00:00
}
return flag3;
}
}
} else {
return false;
}
2026-07-25 08:10:48 +00:00
obj2 = currentlySelectedChannelId(10094);
2026-07-20 16:05:17 +00:00
} else {
return false;
}
}
tmp2 = new tmp2();
2026-07-23 10:11:24 +00:00
let result = require("_possibleConstructorReturn").fileFinishedImporting("modules/self_mod/ChannelSafetyWarningsManager.tsx");
2026-07-20 16:05:17 +00:00
export default tmp2;