decord/source/actions/native/MessagePreviewActionCreators.tsx

31 lines
1,016 B
TypeScript
Raw Normal View History

// Module ID: 16644
// Function ID: 16645
// Dependencies: [1074, 1272, 573, 2]
2026-07-20 16:05:17 +00:00
// Module 16644
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import dispatcherDefault from "dispatcher" /* 573 */;
import ME from "ME" /* 1074 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
({ Endpoints: c3, MAX_MESSAGES_PER_CHANNEL: c4 } = ME);
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("actions/native/MessagePreviewActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export default {
fetchMessages(channelId, around) {
2026-07-23 10:11:24 +00:00
const _require = channelId;
2026-08-24 06:08:38 +00:00
closure_1 = around;
const HTTP = _require(1272).HTTP;
2026-07-29 08:29:29 +00:00
obj = { url: closure_3.MESSAGES(channelId), query: obj, retries: 2, oldFormErrors: true, rejectWithError: true };
2026-07-20 16:05:17 +00:00
obj = { limit: closure_4, around };
const value = HTTP.get(obj);
value.then((body) => {
2026-08-24 06:08:38 +00:00
let obj = around(closure_1_2[2]);
2026-07-23 10:11:24 +00:00
obj = { type: "LOAD_MESSAGES_AROUND_SUCCESS", channelId: closure_0, messages: body.body, around };
2026-07-20 16:05:17 +00:00
obj.dispatch(obj);
});
},
clearMessages() {
2026-08-24 06:08:38 +00:00
dispatcherDefault.dispatch({ type: "CLEAR_MESSAGES_AROUND_SUCCESS" });
2026-07-20 16:05:17 +00:00
}
};