decord/alpha/source/actions/native/MessagePreviewActionCreators.tsx

39 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-10-08 09:57:35 +00:00
// Module ID: 17114
// Function ID: 17115
// Name: MessagePreviewActionCreators
2026-10-08 09:57:35 +00:00
// Dependencies: [1085, 1294, 584, 2]
2026-07-20 16:05:17 +00:00
2026-10-08 09:57:35 +00:00
// Module 17114 (MessagePreviewActionCreators)
2026-10-03 08:58:59 +00:00
import DispatcherDefault from "Dispatcher" /* 584 */;
import Constants from "Constants" /* 1085 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
2026-10-03 08:58:59 +00:00
let _require;
2026-10-03 08:58:59 +00:00
let c3;
let closure_4;
({ Endpoints: c3, MAX_MESSAGES_PER_CHANNEL: closure_4 } = Constants);
2026-10-03 08:58:59 +00:00
let obj = {
2026-07-20 16:05:17 +00:00
fetchMessages(channelId, around) {
2026-10-03 08:58:59 +00:00
let obj;
_require = channelId;
const HTTP = require("HTTPUtils").HTTP;
2026-10-03 08:58:59 +00:00
const request = { url: closure_3.MESSAGES(channelId), query: obj, retries: 2, oldFormErrors: true, rejectWithError: true };
obj = { limit, around };
const value = HTTP.get(request);
2026-07-20 16:05:17 +00:00
value.then((body) => {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "LOAD_MESSAGES_AROUND_SUCCESS", channelId, messages: body.body, around };
obj.dispatch(obj2);
2026-07-20 16:05:17 +00:00
});
},
clearMessages() {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
obj.dispatch({ type: "CLEAR_MESSAGES_AROUND_SUCCESS" });
2026-07-20 16:05:17 +00:00
}
};
2026-10-03 08:58:59 +00:00
const result = size.fileFinishedImporting("actions/native/MessagePreviewActionCreators.tsx");
export default obj;