2026-09-24 10:59:02 +00:00
|
|
|
// Module ID: 17212
|
|
|
|
|
// Function ID: 17213
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: MessagePreviewActionCreators
|
2026-09-15 14:23:42 +00:00
|
|
|
// Dependencies: [1074, 1271, 573, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-24 10:59:02 +00:00
|
|
|
// Module 17212 (MessagePreviewActionCreators)
|
2026-09-10 05:38:07 +00:00
|
|
|
import DispatcherDefault from "Dispatcher" /* 573 */;
|
|
|
|
|
import Constants from "Constants" /* 1074 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const require = globalThis.__r;
|
|
|
|
|
|
|
|
|
|
({ Endpoints: c3, MAX_MESSAGES_PER_CHANNEL: closure_4 } = Constants);
|
|
|
|
|
const result = size.fileFinishedImporting("actions/native/MessagePreviewActionCreators.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
fetchMessages(channelId, around) {
|
2026-09-10 05:38:07 +00:00
|
|
|
_require = channelId;
|
|
|
|
|
const HTTP = require("HTTPUtils").HTTP;
|
|
|
|
|
const request = { url: closure_3.MESSAGES(channelId), query: { limit, around }, retries: 2, oldFormErrors: true, rejectWithError: true };
|
|
|
|
|
value = HTTP.get(request);
|
2026-07-20 16:05:17 +00:00
|
|
|
value.then((body) => {
|
2026-09-10 05:38:07 +00:00
|
|
|
DispatcherDefault.dispatch({ type: "LOAD_MESSAGES_AROUND_SUCCESS", channelId, messages: body.body, around });
|
2026-07-20 16:05:17 +00:00
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
clearMessages() {
|
2026-09-10 05:38:07 +00:00
|
|
|
DispatcherDefault.dispatch({ type: "CLEAR_MESSAGES_AROUND_SUCCESS" });
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
};
|