decord/source/actions/native/MessagePreviewActionCreators.tsx

31 lines
1,012 B
TypeScript
Raw Normal View History

2026-09-03 10:05:34 +00:00
// Module ID: 16481
// Function ID: 16482
2026-09-02 09:53:35 +00:00
// Dependencies: [673, 527, 706, 2]
2026-07-20 16:05:17 +00:00
2026-09-03 10:05:34 +00:00
// Module 16481
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
2026-09-02 09:53:35 +00:00
import dispatcherDefault from "dispatcher" /* 706 */;
import ME from "ME" /* 673 */;
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;
2026-09-02 09:53:35 +00:00
const HTTP = _require(527).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
}
};