decord/source/modules/conversations/ConversationsActionCreators.tsx

79 lines
3.6 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 9202
2026-07-27 11:26:19 +00:00
// Function ID: 72130
2026-07-20 16:05:17 +00:00
// Name: _fetchChannelConversations
2026-07-25 08:10:48 +00:00
// Dependencies: [5, 5830, 9203, 5832, 653, 9200, 686, 507, 5685, 9204, 9205, 9212, 2]
2026-07-20 16:05:17 +00:00
// Exports: clearConversationSelection, fetchChannelConversations, setConversationFeedbackRating, setSelectedConversation, toggleConversationHighlighting, trackTopicalNavigationEntrypointImpression
2026-07-25 08:10:48 +00:00
// Module 9202 (_fetchChannelConversations)
2026-07-23 10:11:24 +00:00
import useGuildHasFeature from "useGuildHasFeature";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_5 from "_isNativeReflectConstruct";
import { FETCH_LIMIT } from "CONVERSATION_COLORS";
import { Endpoints } from "ME";
const require = arg1;
2026-07-20 16:05:17 +00:00
function _fetchChannelConversations() {
// CreateGeneratorClosureLongIndex (0x67)
const obj = callback(tmp);
return obj(...arguments);
}
function fetchConversationMessages(channelId, guildId, id, arg3) {
return _fetchConversationMessages(...arguments);
}
function _fetchConversationMessages() {
// CreateGeneratorClosureLongIndex (0x67)
const obj = callback(tmp);
return obj(...arguments);
}
2026-07-23 10:11:24 +00:00
let result = require("_isNativeReflectConstruct").fileFinishedImporting("modules/conversations/ConversationsActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const fetchChannelConversations = function fetchChannelConversations(arg0) {
return _fetchChannelConversations(...arguments);
};
export const toggleConversationHighlighting = function toggleConversationHighlighting() {
2026-07-23 10:11:24 +00:00
importDefault(686).dispatch({ type: "CONVERSATIONS_TOGGLE_HIGHLIGHTING" });
2026-07-20 16:05:17 +00:00
};
export const setSelectedConversation = function setSelectedConversation(channelId, guildId, conversationId) {
let flag = arg3;
if (arg3 === undefined) {
flag = true;
}
2026-07-23 10:11:24 +00:00
let obj = importDefault(686);
2026-07-20 16:05:17 +00:00
obj = { type: "SET_SELECTED_CONVERSATION", channelId, conversationId };
obj.dispatch(obj);
2026-07-23 10:11:24 +00:00
fetchConversationMessages(channelId, guildId, conversationId, { includeReactions: true, includeMessageReferences: true });
conversationMetadata = conversationMetadata.getConversationMetadata(channelId, conversationId);
2026-07-20 16:05:17 +00:00
if (flag) {
let startMessageId;
if (null != conversationMetadata) {
startMessageId = conversationMetadata.conversation.startMessageId;
}
flag = null != startMessageId;
}
if (flag) {
obj = { channelId, messageId: conversationMetadata.conversation.startMessageId, flash: false };
2026-07-25 08:10:48 +00:00
importDefault(5685).jumpToMessage(obj);
const obj3 = importDefault(5685);
2026-07-20 16:05:17 +00:00
}
};
export const clearConversationSelection = function clearConversationSelection(channelId, conversationId) {
2026-07-23 10:11:24 +00:00
let obj = importDefault(686);
2026-07-20 16:05:17 +00:00
obj = { type: "CLEAR_CONVERSATION_SELECTION", channelId, conversationId };
obj.dispatch(obj);
};
2026-07-23 10:11:24 +00:00
export const setConversationFeedbackRating = function setConversationFeedbackRating(outer1_0, outer1_1, down) {
let obj = importDefault(686);
obj = { type: "SET_CONVERSATION_FEEDBACK_RATING", channelId: outer1_0, conversationId: outer1_1, rating: down };
2026-07-20 16:05:17 +00:00
obj.dispatch(obj);
};
export { fetchConversationMessages };
2026-07-21 22:01:30 +00:00
export const trackTopicalNavigationEntrypointImpression = function trackTopicalNavigationEntrypointImpression(id, stateFromStores1) {
2026-07-25 08:10:48 +00:00
const ConversationsAnalytics = require(9204) /* channelProps */.ConversationsAnalytics;
2026-07-21 22:01:30 +00:00
const result = ConversationsAnalytics.trackEntrypointImpression({ channelId: id, conversationCount: stateFromStores1 });
2026-07-20 16:05:17 +00:00
if (closure_5.shouldTriggerOnNextExposure()) {
2026-07-25 08:10:48 +00:00
importDefault(9205).fireSurveyAction(require(9212) /* SurveyActionTypes */.SurveyActionTypes.TOPICAL_NAVIGATION_MULTIPLE_IMPRESSIONS);
const obj2 = importDefault(9205);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
importDefault(686).dispatch({ type: "TOPICAL_NAVIGATION_ENTRYPOINT_IMPRESSION" });
2026-07-20 16:05:17 +00:00
};