decord/source/modules/self_mod/ChannelSafetyWarningsActionCreators.tsx

50 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 10352
// Function ID: 10353
2026-07-20 16:05:17 +00:00
// Name: dismissChannelSafetyWarnings
2026-08-08 06:10:11 +00:00
// Dependencies: [9668, 676, 709, 530, 2]
2026-07-20 16:05:17 +00:00
// Exports: acknowledgeChannelSafetyWarningTooltip, clearChannelSafetyWarnings, dismissChannelSafetyWarnings, markAsStrangerDanger, reportFalsePositive, setChannelSafetyWarningFeedback
2026-08-08 06:10:11 +00:00
// Module 10352 (dismissChannelSafetyWarnings)
2026-07-29 08:29:29 +00:00
import { SafetyWarningTypes } from "handleConnectionOpen";
2026-07-23 10:11:24 +00:00
import { Endpoints } from "ME";
const result = require("dispatcher").fileFinishedImporting("modules/self_mod/ChannelSafetyWarningsActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const dismissChannelSafetyWarnings = function dismissChannelSafetyWarnings(channelId, items) {
2026-07-29 08:29:29 +00:00
let obj = importDefault(709);
2026-07-20 16:05:17 +00:00
obj = { type: "DISMISS_CHANNEL_SAFETY_WARNINGS", channelId, warningIds: items };
obj.dispatch(obj);
2026-07-29 08:29:29 +00:00
const HTTP = require(530) /* sendRequest */.HTTP;
obj = { url: Endpoints.CHANNEL_SAFETY_WARNINGS_ACK(channelId), body: obj1, oldFormErrors: true, rejectWithError: null };
obj[3] = require(530) /* sendRequest */.rejectWithMigratedError();
2026-07-20 16:05:17 +00:00
return HTTP.post(obj);
};
export const setChannelSafetyWarningFeedback = function setChannelSafetyWarningFeedback(channelId, warningId, feedbackType) {
2026-07-29 08:29:29 +00:00
let obj = importDefault(709);
2026-07-20 16:05:17 +00:00
obj = { type: "CHANNEL_SAFETY_WARNING_FEEDBACK", channelId, warningId, feedbackType };
obj.dispatch(obj);
};
export const clearChannelSafetyWarnings = function clearChannelSafetyWarnings(channelId) {
2026-07-29 08:29:29 +00:00
let obj = importDefault(709);
2026-07-20 16:05:17 +00:00
obj = { type: "CLEAR_CHANNEL_SAFETY_WARNINGS", channelId };
obj.dispatch(obj);
};
export const acknowledgeChannelSafetyWarningTooltip = function acknowledgeChannelSafetyWarningTooltip(channelId) {
2026-07-29 08:29:29 +00:00
let obj = importDefault(709);
2026-07-20 16:05:17 +00:00
obj = { type: "ACKNOWLEDGE_CHANNEL_SAFETY_WARNING_TOOLTIP", channelId };
obj.dispatch(obj);
};
export const reportFalsePositive = function reportFalsePositive(arg0) {
2026-07-29 08:29:29 +00:00
const HTTP = require(530) /* sendRequest */.HTTP;
const obj = { url: Endpoints.SAFETY_WARNING_FALSE_POSITIVE(arg0), rejectWithError: null };
obj[1] = require(530) /* sendRequest */.rejectWithMigratedError();
2026-07-20 16:05:17 +00:00
return HTTP.post(obj);
};
export const markAsStrangerDanger = function markAsStrangerDanger(id) {
2026-07-29 08:29:29 +00:00
const HTTP = require(530) /* sendRequest */.HTTP;
obj = { url: Endpoints.ADD_SAFETY_WARNING(id), body: obj, rejectWithError: null };
obj = { safety_warning_type: SafetyWarningTypes.STRANGER_DANGER };
obj[2] = require(530) /* sendRequest */.rejectWithMigratedError();
2026-07-20 16:05:17 +00:00
return HTTP.post(obj);
};