decord/source/modules/interactions/InteractionActionCreators.tsx

53 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 7837
2026-07-27 11:26:19 +00:00
// Function ID: 62561
2026-07-20 16:05:17 +00:00
// Name: _fetchMessageInteractionData
2026-07-23 10:11:24 +00:00
// Dependencies: [5, 653, 686, 507, 2]
2026-07-20 16:05:17 +00:00
// Exports: addQueued, fetchMessageInteractionData, queueInteractionComponentState, setFailed
2026-07-25 08:10:48 +00:00
// Module 7837 (_fetchMessageInteractionData)
2026-07-23 10:11:24 +00:00
import asyncGeneratorStep from "asyncGeneratorStep";
import { Endpoints } from "ME";
const require = arg1;
async function _fetchMessageInteractionData(arg0, arg1, arg2) {
const HTTP = outer2_0(outer2_2[3]).HTTP;
let obj = { url: outer2_4.MESSAGE_INTERACTION_DATA(arg0, arg1), oldFormErrors: true, rejectWithError: outer2_0(outer2_2[3]).rejectWithMigratedError() };
2026-07-20 16:05:17 +00:00
const tmp = yield HTTP.get(obj);
if (tmp.ok) {
const body = tmp.body;
2026-07-23 10:11:24 +00:00
obj = { type: "LOAD_MESSAGE_INTERACTION_DATA_SUCCESS", channelId: arg0, messageId: arg1, interactionData: body };
outer2_1(outer2_2[2]).dispatch(obj);
2026-07-20 16:05:17 +00:00
return body;
} else {
return null;
}
2026-07-23 10:11:24 +00:00
const obj2 = outer2_0(outer2_2[3]);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const result = require("dispatcher").fileFinishedImporting("modules/interactions/InteractionActionCreators.tsx");
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
export const queueInteractionComponentState = function queueInteractionComponentState(messageId, nonce, localState, componentId) {
let obj = importDefault(686);
obj = { type: "QUEUE_INTERACTION_COMPONENT_STATE", messageId, nonce, state: localState, componentId };
2026-07-20 16:05:17 +00:00
obj.dispatch(obj);
};
2026-07-23 10:11:24 +00:00
export const addQueued = function addQueued(nonce, arg1) {
2026-07-20 16:05:17 +00:00
let data;
let messageId;
let onCreate;
let onFailure;
let onSuccess;
let preflight;
({ data, messageId, preflight, onCreate, onSuccess, onFailure } = arg1);
2026-07-23 10:11:24 +00:00
let obj = importDefault(686);
obj = { type: "INTERACTION_QUEUE", data, nonce, messageId, preflight, onCreate, onSuccess, onFailure };
2026-07-20 16:05:17 +00:00
obj.dispatch(obj);
};
export const setFailed = function setFailed(closure_0, code, message, status) {
2026-07-23 10:11:24 +00:00
let obj = importDefault(686);
2026-07-20 16:05:17 +00:00
obj = { type: "INTERACTION_FAILURE", nonce: closure_0, errorMessage: message, errorCode: code, status };
obj.dispatch(obj);
};
export const fetchMessageInteractionData = function fetchMessageInteractionData(channelId, messageId) {
return _fetchMessageInteractionData(...arguments);
};