@corva/chat-core 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +12 -13
- package/dist/index.js +85 -109
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -497,10 +497,6 @@ interface TypingEventData {
|
|
|
497
497
|
isTyping: boolean;
|
|
498
498
|
roomId: string;
|
|
499
499
|
}
|
|
500
|
-
interface ReadyServerData {
|
|
501
|
-
_id: string;
|
|
502
|
-
name?: string;
|
|
503
|
-
}
|
|
504
500
|
interface ReadyChannelData {
|
|
505
501
|
_id: string;
|
|
506
502
|
channel_type: string;
|
|
@@ -518,7 +514,7 @@ interface RevoltSocketEventHandlers {
|
|
|
518
514
|
onAuthenticated?: () => void;
|
|
519
515
|
onDisconnected?: () => void;
|
|
520
516
|
onInvalidSession?: () => void;
|
|
521
|
-
onReady?: (channels: ReadyChannelData[], channelUnreads?: ChannelUnread[]
|
|
517
|
+
onReady?: (channels: ReadyChannelData[], channelUnreads?: ChannelUnread[]) => void;
|
|
522
518
|
onMessage?: (message: Message) => void;
|
|
523
519
|
onMessageUpdate?: (messageId: string, channelId: string, data: {
|
|
524
520
|
content?: string;
|
|
@@ -529,6 +525,7 @@ interface RevoltSocketEventHandlers {
|
|
|
529
525
|
onTyping?: (data: TypingEventData) => void;
|
|
530
526
|
onRoomChange?: (roomId: string, change: unknown) => void;
|
|
531
527
|
onChannelAck?: (channelId: string, messageId: string) => void;
|
|
528
|
+
onServerMembersChange?: (serverId: string) => void;
|
|
532
529
|
onError?: (error: unknown) => void;
|
|
533
530
|
}
|
|
534
531
|
|
|
@@ -1179,6 +1176,7 @@ interface CorvaRevoltAuthResponse {
|
|
|
1179
1176
|
revolt_channel_id: string;
|
|
1180
1177
|
revolt_channel_server_id?: string;
|
|
1181
1178
|
revolt_channel_company_id?: number;
|
|
1179
|
+
revolt_channel_joined?: boolean;
|
|
1182
1180
|
revolt_chat_channels?: AssetChatChannel[];
|
|
1183
1181
|
chat_used?: boolean | null;
|
|
1184
1182
|
}
|
|
@@ -1250,8 +1248,11 @@ interface AssetChatSession {
|
|
|
1250
1248
|
channelId: string;
|
|
1251
1249
|
serverId: string | null;
|
|
1252
1250
|
companyId: number | null;
|
|
1251
|
+
joined: boolean;
|
|
1253
1252
|
}
|
|
1254
|
-
declare function getAssetChatSession(assetId: string, assetType: ChatAssetType
|
|
1253
|
+
declare function getAssetChatSession(assetId: string, assetType: ChatAssetType, { join }?: {
|
|
1254
|
+
join?: boolean;
|
|
1255
|
+
}): Promise<AssetChatSession>;
|
|
1255
1256
|
declare function getAssetChatChannel(assetId: string, assetType: ChatAssetType): Promise<string>;
|
|
1256
1257
|
|
|
1257
1258
|
type StoredCorvaUser = CorvaUser | CorvaAPIUser;
|
|
@@ -1308,9 +1309,7 @@ interface ExternalChannel {
|
|
|
1308
1309
|
interface AuthStore {
|
|
1309
1310
|
user: User | null;
|
|
1310
1311
|
serverId: string | null;
|
|
1311
|
-
corvaCompanyId: number | null;
|
|
1312
1312
|
externalChannels: Record<string, ExternalChannel>;
|
|
1313
|
-
serverNames: string[] | null;
|
|
1314
1313
|
isConnected: boolean;
|
|
1315
1314
|
hasEverConnected: boolean;
|
|
1316
1315
|
connectionGaveUp: boolean;
|
|
@@ -1321,7 +1320,6 @@ interface AuthStore {
|
|
|
1321
1320
|
setHasEverConnected: (hasConnected: boolean) => void;
|
|
1322
1321
|
addAssetChatChannel: (channel: AssetChatChannel) => void;
|
|
1323
1322
|
setChannelServer: (channelId: string, serverId: string | null, companyId: number | null) => void;
|
|
1324
|
-
setServerNames: (names: string[]) => void;
|
|
1325
1323
|
markChatUsed: () => void;
|
|
1326
1324
|
login: (credentials: LoginCredentials) => Promise<{
|
|
1327
1325
|
success: boolean;
|
|
@@ -1341,7 +1339,6 @@ interface AuthStore {
|
|
|
1341
1339
|
declare function keepChatUsed(current: boolean | null, incoming: boolean | null | undefined): boolean | null;
|
|
1342
1340
|
declare const authStore: zustand_vanilla.StoreApi<AuthStore>;
|
|
1343
1341
|
declare const getExternalChannel: (roomId: string | null | undefined) => ExternalChannel | null;
|
|
1344
|
-
declare const waitForServerNames: (timeoutMs: number) => Promise<string[] | null>;
|
|
1345
1342
|
declare const isExternalServerChannel: (roomId: string | null | undefined) => boolean;
|
|
1346
1343
|
/** @public */
|
|
1347
1344
|
declare const resetAuthStore: () => void;
|
|
@@ -1445,6 +1442,7 @@ interface MemberStore {
|
|
|
1445
1442
|
setTypingUsers: (users: string[]) => void;
|
|
1446
1443
|
simulateTyping: (userKey: string, isTyping: boolean, displayName?: string) => void;
|
|
1447
1444
|
loadRoomMembers: (roomId: string, roomType: RoomType, isAssetChat?: boolean) => Promise<void>;
|
|
1445
|
+
refreshServerMembers: (serverId: string) => void;
|
|
1448
1446
|
searchUsers: (query: string) => Promise<User[]>;
|
|
1449
1447
|
getUserByUsername: (username: string) => Promise<User | null>;
|
|
1450
1448
|
getAllVisibleUsers: () => Promise<User[]>;
|
|
@@ -1528,7 +1526,7 @@ declare const resetUIStore: () => void;
|
|
|
1528
1526
|
interface JoinRequired {
|
|
1529
1527
|
assetId: string;
|
|
1530
1528
|
assetType: ChatAssetType;
|
|
1531
|
-
companyId: number;
|
|
1529
|
+
companyId: number | null;
|
|
1532
1530
|
companyName: string | null;
|
|
1533
1531
|
}
|
|
1534
1532
|
type LockedAsset = ChatAsset & {
|
|
@@ -1716,7 +1714,7 @@ declare const createSocketEventHandlers: (config: SocketEventHandlersConfig) =>
|
|
|
1716
1714
|
onConnected: () => void;
|
|
1717
1715
|
onAuthenticated: () => void;
|
|
1718
1716
|
onDisconnected: () => void;
|
|
1719
|
-
onReady: (channels: ReadyChannelData[], channelUnreads?: ChannelUnread[]
|
|
1717
|
+
onReady: (channels: ReadyChannelData[], channelUnreads?: ChannelUnread[]) => void;
|
|
1720
1718
|
onChannelAck: (channelId: string, messageId: string) => void;
|
|
1721
1719
|
onMessage: (message: Message) => void;
|
|
1722
1720
|
onRoomChange: (roomId: string, change: unknown) => void;
|
|
@@ -1732,10 +1730,11 @@ declare const createSocketEventHandlers: (config: SocketEventHandlersConfig) =>
|
|
|
1732
1730
|
}) => void;
|
|
1733
1731
|
onMessageDelete: (messageId: string, channelId: string) => void;
|
|
1734
1732
|
onUserStatusChange: (userId: string, status: string) => void;
|
|
1733
|
+
onServerMembersChange: (serverId: string) => void;
|
|
1735
1734
|
onInvalidSession: () => void | undefined;
|
|
1736
1735
|
onError: (error: unknown) => void;
|
|
1737
1736
|
};
|
|
1738
1737
|
|
|
1739
1738
|
declare const installUnreadWatcher: () => void;
|
|
1740
1739
|
|
|
1741
|
-
export { ALERT_SEVERITY, ASSET_API_FIELDS, ASSET_CHAT_PREFIXES, ASSET_NOUN, type AckScheduler, type AlertData, type AlertSeverity, type AlertWirePayload, type AppCommentAttachment, type AppCommentData, type AppCommentWirePayload, type AppStateAdapter, type AskCorvaData, type AskCorvaWirePayload, type AssetChatChannel, type AssetChatSession, type AssetStore, type Attachment, type AuthStore, CHANNEL_NAME_MAX_LENGTH, CHANNEL_TYPES, CORVA_MESSAGE_TYPES, CORVA_SYS_PREFIX, type ChannelAsset, type ChannelContentFilter, type ChannelContentFilterStore, type ChannelContentFilters, type ChannelNameValidation, type ChannelNotificationPreference, type ChannelNotificationSetting, type ChannelUnread, type ChatAsset, type ChatAssetIdentity, type ChatAssetType, type ChatDates, type ChatHost, type ChatNotifier, type ChatPlatform, type CorvaAPIUser, type CorvaApiAdapter, type CorvaRevoltAuthResponse, type CorvaSystemMessage, type CorvaUser, type CorvaUserService, DATE_SEPARATOR_LABELS, DEFAULT_CHANNEL_CONTENT_FILTER, DEFAULT_CHANNEL_CONTENT_FILTERS, DEFAULT_CHANNEL_PREFERENCE, DEFAULT_FAVORITE_ROOMS_SETTINGS, DEFAULT_HIDDEN_ROOMS_SETTINGS, DEFAULT_NOTIFICATION_PREFERENCES, DEFAULT_NOTIFICATION_SETTINGS, DEFAULT_ROOM_LIST_ORDER, DIRECT_MESSAGE_PLACEHOLDER, type ExternalChannel, type FavoriteRoomsSettings, type FavoriteRoomsStore, type FeedItemData, type FeedWirePayload, type FileAttachment, type FilterEntityWindow, type ForwardWirePayload, type ForwardedFrom, GENERAL_CHAT_NAME, type HiddenRoomsSettings, type HttpClient, type HttpClientConfig, HttpError, type HttpRequestInit, type HttpResponseLike, type JoinRequired, type KeyValueStorage, type LocatorContext, type LoginCredentials, MAX_ATTACHMENT_SIZE_BYTES, MAX_ATTACHMENT_SIZE_MB, MAX_NAVIGATION_HISTORY, MENTION_REPLACE_PATTERN, MENTION_SPLIT_PATTERN, MUTE_PRESET_OPTIONS, type MemberStore, type Message, type MessageCache, type MessageFormData, type MessageStore, NOTIFICATION_DESTINATIONS, NOTIFICATION_SETTING_ALL, NOTIFICATION_SETTING_MENTIONS, NOTIFICATION_SETTING_NOTHING, type NavigationEntry, type NavigationHistoryStore, type NotificationDestination, type NotificationPreferences, type NotificationSettings, type NotificationStore, PAUSE_INDEFINITELY, PAUSE_PRESETS, PAUSE_PRESET_OPTIONS, type PausePreset, type PausePresetOption, REVOLT_SYSTEM_USER_ID, ROOM_LIST_ORDER, type ReadyChannelData, type
|
|
1740
|
+
export { ALERT_SEVERITY, ASSET_API_FIELDS, ASSET_CHAT_PREFIXES, ASSET_NOUN, type AckScheduler, type AlertData, type AlertSeverity, type AlertWirePayload, type AppCommentAttachment, type AppCommentData, type AppCommentWirePayload, type AppStateAdapter, type AskCorvaData, type AskCorvaWirePayload, type AssetChatChannel, type AssetChatSession, type AssetStore, type Attachment, type AuthStore, CHANNEL_NAME_MAX_LENGTH, CHANNEL_TYPES, CORVA_MESSAGE_TYPES, CORVA_SYS_PREFIX, type ChannelAsset, type ChannelContentFilter, type ChannelContentFilterStore, type ChannelContentFilters, type ChannelNameValidation, type ChannelNotificationPreference, type ChannelNotificationSetting, type ChannelUnread, type ChatAsset, type ChatAssetIdentity, type ChatAssetType, type ChatDates, type ChatHost, type ChatNotifier, type ChatPlatform, type CorvaAPIUser, type CorvaApiAdapter, type CorvaRevoltAuthResponse, type CorvaSystemMessage, type CorvaUser, type CorvaUserService, DATE_SEPARATOR_LABELS, DEFAULT_CHANNEL_CONTENT_FILTER, DEFAULT_CHANNEL_CONTENT_FILTERS, DEFAULT_CHANNEL_PREFERENCE, DEFAULT_FAVORITE_ROOMS_SETTINGS, DEFAULT_HIDDEN_ROOMS_SETTINGS, DEFAULT_NOTIFICATION_PREFERENCES, DEFAULT_NOTIFICATION_SETTINGS, DEFAULT_ROOM_LIST_ORDER, DIRECT_MESSAGE_PLACEHOLDER, type ExternalChannel, type FavoriteRoomsSettings, type FavoriteRoomsStore, type FeedItemData, type FeedWirePayload, type FileAttachment, type FilterEntityWindow, type ForwardWirePayload, type ForwardedFrom, GENERAL_CHAT_NAME, type HiddenRoomsSettings, type HttpClient, type HttpClientConfig, HttpError, type HttpRequestInit, type HttpResponseLike, type JoinRequired, type KeyValueStorage, type LocatorContext, type LoginCredentials, MAX_ATTACHMENT_SIZE_BYTES, MAX_ATTACHMENT_SIZE_MB, MAX_NAVIGATION_HISTORY, MENTION_REPLACE_PATTERN, MENTION_SPLIT_PATTERN, MUTE_PRESET_OPTIONS, type MemberStore, type Message, type MessageCache, type MessageFormData, type MessageStore, NOTIFICATION_DESTINATIONS, NOTIFICATION_SETTING_ALL, NOTIFICATION_SETTING_MENTIONS, NOTIFICATION_SETTING_NOTHING, type NavigationEntry, type NavigationHistoryStore, type NotificationDestination, type NotificationPreferences, type NotificationSettings, type NotificationStore, PAUSE_INDEFINITELY, PAUSE_PRESETS, PAUSE_PRESET_OPTIONS, type PausePreset, type PausePresetOption, REVOLT_SYSTEM_USER_ID, ROOM_LIST_ORDER, type ReadyChannelData, type RevoltAPIInstance, type RevoltChannel, type RevoltIncomingMessagePayload, type RevoltLoginResponse, type RevoltMessage, type RevoltMessageResponse, type RevoltSocketConfig, type RevoltSocketEventHandlers, type RevoltSocketInstance, type RevoltUploadResponse, type RevoltUserResponse, type Room, type RoomListOrder, type RoomStore, type RoomType, SESSION_STORAGE_KEY, SIDEBAR_SECTIONS, SIDEBAR_TABS, SOFT_DELETE_MARKER, SYSTEM_MESSAGE_TEXTS, type SaveSessionParams, type SelectableAssetType, type SessionData, SessionManager, type SharedFile, type SharedRefs, type SidebarSectionKey, type SidebarTabKey, type SocketCloseEventLike, type SocketEventHandlersConfig, type StoredChannelPreference, type Subscription, type TracesViewportRequest, type TypingManager, type UIStore, type UploadAndSendResult, type UploadFile, type UploadedFile, type User, type UserStatus, type ViewportDeepLink, type ViewportIndexCurve, type ViewportMode, WEBSOCKET_CONNECTING, WEBSOCKET_OPEN, type WebSocketLike, type WireSeverity, addMessage, addOrUpdateSubscription, alertMessageAsText, assetStore, authStore, buildAppCommentMessageContent, buildAskCorvaMessageContent, buildFinalMessage, buildForwardMessageContent, buildGroupChannelName, canDeleteMessage, canEditMessage, channelContentFilterStore, channelToAsset, chatToastStore, clearLastOpenedRoom, compareByActivity, compareByName, compareByRecencyDesc, configureChat, configureChatStorage, createAckScheduler, createCorvaUserService, createDMSubscription, createGroupSubscription, createHttpClient, createLatestWinsQueue, createMemoryStorage, createMessageCache, createRevoltAPI, createRevoltSocket, createRoomTaskQueue, createSocketEventHandlers, createSoftDeletedMessage, createTypingManager, deriveAllowedChatAsset, enrichWithCorvaData, ensureChatSession, extractTimestampFromULID, failOptimisticMessage, favoriteRoomsStore, findGeneralRoom, formatAssetChatName, getAppCommentAttachments, getAssetChatChannel, getAssetChatSession, getAssetTypeFromDisplayName, getChatHost, getChatStorage, getCorvaUserFields, getExternalChannel, getLastOpenedRoom, getMessageTimestamp, getPauseUntil, getReactionCount, getRoomDisplayName, getSystemMessageWithCorvaNames, getUserDisplayName, getUserSecondaryText, handleUnauthorized, hasReactions, hasUserReacted, initChat, installUnreadWatcher, isAlertMessage, isAppCommentMessage, isAskCorvaMessage, isChannelMuted, isChatAssetTypeAllowed, isChatStorageConfigured, isCurrentRoomSelection, isDeepEqual, isDefaultChannelPreference, isDisallowedAssetChatRoom, isDmGroup, isExternalServerChannel, isForwardedMessage, isGeneralRoom, isNotificationsPaused, isPauseActive, isSoftDeletedMessage, isSystemMessage, isUnread, isUserOnline, isValidPausePreset, isVisibleUnread, keepChatUsed, loadUntilFound, memberStore, messageStore, navigationHistoryStore, notificationStore, onChatStorageConfigured, parseCorvaSystemMessage, prepareRoomSelection, removeMessageFromList, removeSubscription, resetAssetStore, resetAuthStore, resetChannelContentFilterStore, resetChatAssetPermissionsSnapshot, resetChatHost, resetFavoriteRoomsStore, resetMemberStore, resetMessageStore, resetNavigationHistoryStore, resetNotificationStore, resetRoomStore, resetUIStore, roomStore, saveLastChatActivity, saveLastOpenedRoom, searchMessages, searchRooms, searchUsers, selectCanGoBack, selectCanGoForward, setAllowedChatAssetTypes, settleOptimisticMessage, sharedRefs, sortChannels, sortDMs, sortMessagesByTime, sortUsersByStatus, stripPlatformMentions, uiStore, updateMessageInList, uploadAndSend, validateChannelName, waitForNextPaint, wasRecentlyActive, withChannelPreferenceDefaults };
|
package/dist/index.js
CHANGED
|
@@ -2091,7 +2091,7 @@ function createEventRouter(userCache2, sessionToken, autumnUrl, handlers, getMem
|
|
|
2091
2091
|
break;
|
|
2092
2092
|
case "Ready": {
|
|
2093
2093
|
const readyEvent = message;
|
|
2094
|
-
handlers.onReady?.(readyEvent.channels, readyEvent.channel_unreads
|
|
2094
|
+
handlers.onReady?.(readyEvent.channels, readyEvent.channel_unreads);
|
|
2095
2095
|
break;
|
|
2096
2096
|
}
|
|
2097
2097
|
case "Message":
|
|
@@ -2183,6 +2183,13 @@ function createEventRouter(userCache2, sessionToken, autumnUrl, handlers, getMem
|
|
|
2183
2183
|
}
|
|
2184
2184
|
break;
|
|
2185
2185
|
}
|
|
2186
|
+
case "ServerMemberJoin":
|
|
2187
|
+
case "ServerMemberLeave":
|
|
2188
|
+
if (typeof message.id === "string") handlers.onServerMembersChange?.(message.id);
|
|
2189
|
+
break;
|
|
2190
|
+
case "ServerMemberUpdate":
|
|
2191
|
+
if (message.id?.server) handlers.onServerMembersChange?.(message.id.server);
|
|
2192
|
+
break;
|
|
2186
2193
|
case "UserUpdate":
|
|
2187
2194
|
if (message.data && typeof message.data.online === "boolean") {
|
|
2188
2195
|
handlers.onUserStatusChange?.(message.id, message.data.online ? "online" : "offline");
|
|
@@ -2988,11 +2995,11 @@ var ASSET_ID_PARAM = {
|
|
|
2988
2995
|
frac_fleet: "frac_fleet_id",
|
|
2989
2996
|
intervention_unit: "intervention_unit_id"
|
|
2990
2997
|
};
|
|
2991
|
-
async function getAssetChatSession(assetId, assetType) {
|
|
2998
|
+
async function getAssetChatSession(assetId, assetType, { join = false } = {}) {
|
|
2992
2999
|
if (!assetId || Number.isNaN(Number(assetId))) {
|
|
2993
3000
|
throw new Error("Asset ID is required");
|
|
2994
3001
|
}
|
|
2995
|
-
const body = { [ASSET_ID_PARAM[assetType]]: Number(assetId) };
|
|
3002
|
+
const body = { [ASSET_ID_PARAM[assetType]]: Number(assetId), ...join && { join: true } };
|
|
2996
3003
|
const response = await getChatHost().corvaApi.post(
|
|
2997
3004
|
"/v2/integration/revolt_chat_sessions",
|
|
2998
3005
|
body
|
|
@@ -3003,7 +3010,8 @@ async function getAssetChatSession(assetId, assetType) {
|
|
|
3003
3010
|
return {
|
|
3004
3011
|
channelId: response.revolt_channel_id,
|
|
3005
3012
|
serverId: response.revolt_channel_server_id ?? null,
|
|
3006
|
-
companyId: response.revolt_channel_company_id ?? null
|
|
3013
|
+
companyId: response.revolt_channel_company_id ?? null,
|
|
3014
|
+
joined: response.revolt_channel_joined ?? true
|
|
3007
3015
|
};
|
|
3008
3016
|
}
|
|
3009
3017
|
async function getAssetChatChannel(assetId, assetType) {
|
|
@@ -3293,6 +3301,8 @@ var invalidateVisibleUsers = () => {
|
|
|
3293
3301
|
visibleUsersGeneration += 1;
|
|
3294
3302
|
visibleUsersRequest = null;
|
|
3295
3303
|
};
|
|
3304
|
+
var SERVER_MEMBERS_REFRESH_DELAY_MS = 500;
|
|
3305
|
+
var serverRefreshTimers = /* @__PURE__ */ new Map();
|
|
3296
3306
|
var syncedExternalCompanies = /* @__PURE__ */ new Set();
|
|
3297
3307
|
var ownCompanyId = null;
|
|
3298
3308
|
var seedSocketUsers = (members) => {
|
|
@@ -3464,6 +3474,26 @@ var memberStore = createStore()((set, get) => ({
|
|
|
3464
3474
|
console.error("Failed to load room members:", e);
|
|
3465
3475
|
}
|
|
3466
3476
|
},
|
|
3477
|
+
refreshServerMembers: (serverId) => {
|
|
3478
|
+
clearTimeout(serverRefreshTimers.get(serverId));
|
|
3479
|
+
serverRefreshTimers.set(
|
|
3480
|
+
serverId,
|
|
3481
|
+
setTimeout(() => {
|
|
3482
|
+
serverRefreshTimers.delete(serverId);
|
|
3483
|
+
const isOwnServer = serverId === authStore.getState().serverId;
|
|
3484
|
+
if (isOwnServer) {
|
|
3485
|
+
set({ serverMembersLoaded: false, serverMembersCache: null, allVisibleUsersCache: null });
|
|
3486
|
+
invalidateVisibleUsers();
|
|
3487
|
+
}
|
|
3488
|
+
const room = roomStore.getState().currentRoom;
|
|
3489
|
+
if (!room) return;
|
|
3490
|
+
const external = getExternalChannel(room._id);
|
|
3491
|
+
const showsServerMembers = external ? external.serverId === serverId : isOwnServer;
|
|
3492
|
+
if (!showsServerMembers || !external && room.t !== "c") return;
|
|
3493
|
+
get().loadRoomMembers(room._id, room.t, !!external).catch((e) => console.error("Failed to refresh room members:", e));
|
|
3494
|
+
}, SERVER_MEMBERS_REFRESH_DELAY_MS)
|
|
3495
|
+
);
|
|
3496
|
+
},
|
|
3467
3497
|
searchUsers: async (query) => {
|
|
3468
3498
|
try {
|
|
3469
3499
|
const currentRoomId = roomStore.getState().currentRoom?._id;
|
|
@@ -3593,6 +3623,8 @@ async function mapCorvaUsers(companyId, revoltUsers) {
|
|
|
3593
3623
|
}
|
|
3594
3624
|
}
|
|
3595
3625
|
var resetMemberStore = () => {
|
|
3626
|
+
serverRefreshTimers.forEach((timer) => clearTimeout(timer));
|
|
3627
|
+
serverRefreshTimers.clear();
|
|
3596
3628
|
syncedExternalCompanies.clear();
|
|
3597
3629
|
ownCompanyId = null;
|
|
3598
3630
|
invalidateVisibleUsers();
|
|
@@ -3606,7 +3638,6 @@ var ASSET_RESOURCE = {
|
|
|
3606
3638
|
intervention_unit: "intervention_units"
|
|
3607
3639
|
};
|
|
3608
3640
|
var ownerRequests = /* @__PURE__ */ new Map();
|
|
3609
|
-
var joinedThisSession = /* @__PURE__ */ new Set();
|
|
3610
3641
|
async function fetchAssetOwnerCompany(assetId, assetType) {
|
|
3611
3642
|
const response = await getChatHost().corvaApi.get(
|
|
3612
3643
|
`/v2/${ASSET_RESOURCE[assetType]}/${assetId}`,
|
|
@@ -3628,55 +3659,45 @@ function getAssetOwnerCompany(assetId, assetType) {
|
|
|
3628
3659
|
ownerRequests.set(key, request);
|
|
3629
3660
|
return request;
|
|
3630
3661
|
}
|
|
3631
|
-
var normalizeName = (name) => name.trim().toLowerCase();
|
|
3632
|
-
function isOnCompanyServer(serverNames, companyName) {
|
|
3633
|
-
if (!companyName) return false;
|
|
3634
|
-
const target = normalizeName(companyName);
|
|
3635
|
-
return serverNames.some((name) => normalizeName(name) === target);
|
|
3636
|
-
}
|
|
3637
|
-
var joinedKey = (revoltUserId) => `corva_chat_joined_companies_${revoltUserId}`;
|
|
3638
|
-
function readJoinedCompanies(revoltUserId) {
|
|
3639
|
-
try {
|
|
3640
|
-
const raw = getChatStorage().getItem(joinedKey(revoltUserId));
|
|
3641
|
-
const parsed = raw ? JSON.parse(raw) : [];
|
|
3642
|
-
return Array.isArray(parsed) ? parsed.filter((id) => typeof id === "number") : [];
|
|
3643
|
-
} catch {
|
|
3644
|
-
return [];
|
|
3645
|
-
}
|
|
3646
|
-
}
|
|
3647
|
-
function hasJoinedCompany(revoltUserId, companyId) {
|
|
3648
|
-
return joinedThisSession.has(`${revoltUserId}:${companyId}`) || readJoinedCompanies(revoltUserId).includes(companyId);
|
|
3649
|
-
}
|
|
3650
|
-
function markCompanyJoined(revoltUserId, companyId) {
|
|
3651
|
-
joinedThisSession.add(`${revoltUserId}:${companyId}`);
|
|
3652
|
-
const joined = readJoinedCompanies(revoltUserId);
|
|
3653
|
-
if (joined.includes(companyId)) return;
|
|
3654
|
-
try {
|
|
3655
|
-
getChatStorage().setItem(joinedKey(revoltUserId), JSON.stringify([...joined, companyId]));
|
|
3656
|
-
} catch (error) {
|
|
3657
|
-
console.error("Failed to save joined company:", error);
|
|
3658
|
-
}
|
|
3659
|
-
}
|
|
3660
3662
|
function resetAssetOwnerCompanies() {
|
|
3661
3663
|
ownerRequests.clear();
|
|
3662
|
-
joinedThisSession.clear();
|
|
3663
3664
|
}
|
|
3664
3665
|
|
|
3665
3666
|
// src/store/stores/assetStore.ts
|
|
3666
|
-
var SERVER_NAMES_WAIT_MS = 5e3;
|
|
3667
3667
|
var joinApprovedAssets = /* @__PURE__ */ new Set();
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3668
|
+
var assetKey = (assetType, assetId) => `${assetType}:${assetId}`;
|
|
3669
|
+
var isJoinUnderway = (assetType, assetId) => joinApprovedAssets.has(assetKey(assetType, assetId)) || assetStore.getState().currentAssetId === assetId && !!assetStore.getState().assetChatId;
|
|
3670
|
+
async function toJoinRequired(assetId, assetType, session) {
|
|
3671
|
+
const owner = await getAssetOwnerCompany(assetId, assetType).catch(() => null);
|
|
3672
|
+
return {
|
|
3673
|
+
assetId,
|
|
3674
|
+
assetType,
|
|
3675
|
+
companyId: session.companyId ?? owner?.id ?? null,
|
|
3676
|
+
companyName: owner?.name ?? null
|
|
3677
|
+
};
|
|
3678
|
+
}
|
|
3679
|
+
async function fetchJoinedAssetChatId(assetId, assetType) {
|
|
3680
|
+
let session;
|
|
3681
|
+
try {
|
|
3682
|
+
session = await getAssetChatSession(assetId, assetType);
|
|
3683
|
+
} catch (e) {
|
|
3684
|
+
console.error("Failed to fetch asset chat channel:", e);
|
|
3685
|
+
return null;
|
|
3686
|
+
}
|
|
3687
|
+
if (!session.joined) {
|
|
3688
|
+
const joinRequired = await toJoinRequired(assetId, assetType, session);
|
|
3689
|
+
const isCurrent = assetStore.getState().currentAssetId === assetId;
|
|
3690
|
+
if (isCurrent && !isJoinUnderway(assetType, assetId)) assetStore.setState({ joinRequired });
|
|
3677
3691
|
return null;
|
|
3678
3692
|
}
|
|
3679
|
-
|
|
3693
|
+
const chatId = session.channelId;
|
|
3694
|
+
registerChannelServer(session);
|
|
3695
|
+
registerAssetChatChannel(chatId, assetId, assetType);
|
|
3696
|
+
assetStore.setState((state) => ({
|
|
3697
|
+
assetChatId: chatId,
|
|
3698
|
+
knownAssetChatIds: new Set(Array.from(state.knownAssetChatIds).concat(chatId))
|
|
3699
|
+
}));
|
|
3700
|
+
return chatId;
|
|
3680
3701
|
}
|
|
3681
3702
|
var registerAssetChatChannel = (channelId, assetId, assetType) => {
|
|
3682
3703
|
const id = Number(assetId);
|
|
@@ -3746,20 +3767,23 @@ var assetStore = createStore()((set, get) => ({
|
|
|
3746
3767
|
});
|
|
3747
3768
|
const isStale = () => get().currentAssetId !== assetId;
|
|
3748
3769
|
try {
|
|
3749
|
-
const
|
|
3770
|
+
const join = joinApprovedAssets.has(assetKey(assetType, assetId));
|
|
3771
|
+
const session = await getAssetChatSession(assetId, assetType, { join });
|
|
3750
3772
|
if (isStale()) return;
|
|
3751
|
-
if (
|
|
3773
|
+
if (!session.joined) {
|
|
3774
|
+
if (join) throw new Error("Could not join this chat");
|
|
3775
|
+
const joinRequired = await toJoinRequired(assetId, assetType, session);
|
|
3776
|
+
if (isStale() || isJoinUnderway(assetType, assetId)) return;
|
|
3752
3777
|
set({ joinRequired });
|
|
3753
3778
|
uiStore.setState({ isLoading: false });
|
|
3754
3779
|
return;
|
|
3755
3780
|
}
|
|
3756
|
-
const session = await getAssetChatSession(assetId, assetType);
|
|
3757
|
-
if (isStale()) return;
|
|
3758
3781
|
const chatId = session.channelId;
|
|
3759
3782
|
registerChannelServer(session);
|
|
3760
3783
|
registerAssetChatChannel(chatId, assetId, assetType);
|
|
3761
3784
|
set({
|
|
3762
3785
|
assetChatId: chatId,
|
|
3786
|
+
joinRequired: null,
|
|
3763
3787
|
knownAssetChatIds: new Set(Array.from(currentState.knownAssetChatIds).concat(chatId))
|
|
3764
3788
|
});
|
|
3765
3789
|
uiStore.setState({ isLoading: false });
|
|
@@ -3801,9 +3825,8 @@ var assetStore = createStore()((set, get) => ({
|
|
|
3801
3825
|
},
|
|
3802
3826
|
joinAssetChat: async () => {
|
|
3803
3827
|
const { joinRequired } = get();
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
const approvalKey = `${joinRequired.assetType}:${joinRequired.assetId}`;
|
|
3828
|
+
if (!joinRequired) return;
|
|
3829
|
+
const approvalKey = assetKey(joinRequired.assetType, joinRequired.assetId);
|
|
3807
3830
|
joinApprovedAssets.add(approvalKey);
|
|
3808
3831
|
set({ joinRequired: null });
|
|
3809
3832
|
const { currentAssetName, currentAssetStatus } = get();
|
|
@@ -3814,46 +3837,21 @@ var assetStore = createStore()((set, get) => ({
|
|
|
3814
3837
|
currentAssetName ?? void 0,
|
|
3815
3838
|
currentAssetStatus ?? void 0
|
|
3816
3839
|
);
|
|
3817
|
-
if (get().assetChatId) markCompanyJoined(userId, joinRequired.companyId);
|
|
3818
3840
|
} finally {
|
|
3819
3841
|
joinApprovedAssets.delete(approvalKey);
|
|
3820
3842
|
}
|
|
3821
3843
|
},
|
|
3822
3844
|
ensureAssetChatSubscription: async () => {
|
|
3823
|
-
const { currentAssetId, currentAssetType } = get();
|
|
3845
|
+
const { currentAssetId, currentAssetType, joinRequired: pendingJoin } = get();
|
|
3824
3846
|
if (!currentAssetId || !currentAssetType) return null;
|
|
3825
3847
|
if (!isChatAssetTypeAllowed(currentAssetType)) return null;
|
|
3848
|
+
if (pendingJoin?.assetId === currentAssetId) return null;
|
|
3826
3849
|
const cached = inFlightByAsset.get(currentAssetId);
|
|
3827
3850
|
if (cached) return cached;
|
|
3828
3851
|
const promise = (async () => {
|
|
3829
3852
|
try {
|
|
3830
|
-
|
|
3831
|
-
if (!chatId)
|
|
3832
|
-
let joinRequired;
|
|
3833
|
-
try {
|
|
3834
|
-
joinRequired = await getJoinRequired(currentAssetId, currentAssetType);
|
|
3835
|
-
} catch (e) {
|
|
3836
|
-
console.error("Failed to check asset chat access:", e);
|
|
3837
|
-
return null;
|
|
3838
|
-
}
|
|
3839
|
-
if (joinRequired) {
|
|
3840
|
-
if (get().currentAssetId === currentAssetId) set({ joinRequired });
|
|
3841
|
-
return null;
|
|
3842
|
-
}
|
|
3843
|
-
try {
|
|
3844
|
-
const session = await getAssetChatSession(currentAssetId, currentAssetType);
|
|
3845
|
-
chatId = session.channelId;
|
|
3846
|
-
registerChannelServer(session);
|
|
3847
|
-
registerAssetChatChannel(chatId, currentAssetId, currentAssetType);
|
|
3848
|
-
set({
|
|
3849
|
-
assetChatId: chatId,
|
|
3850
|
-
knownAssetChatIds: new Set(Array.from(get().knownAssetChatIds).concat(chatId))
|
|
3851
|
-
});
|
|
3852
|
-
} catch (e) {
|
|
3853
|
-
console.error("Failed to fetch asset chat channel:", e);
|
|
3854
|
-
return null;
|
|
3855
|
-
}
|
|
3856
|
-
}
|
|
3853
|
+
const chatId = get().assetChatId ?? await fetchJoinedAssetChatId(currentAssetId, currentAssetType);
|
|
3854
|
+
if (!chatId) return null;
|
|
3857
3855
|
const existing = roomStore.getState().subscriptions.find((s) => s.rid === chatId);
|
|
3858
3856
|
if (existing) return existing;
|
|
3859
3857
|
const { api } = sharedRefs;
|
|
@@ -4678,9 +4676,7 @@ onChatStorageConfigured(() => uiStore.setState(loadAttentionBudget()));
|
|
|
4678
4676
|
var getInitialState6 = () => ({
|
|
4679
4677
|
user: null,
|
|
4680
4678
|
serverId: null,
|
|
4681
|
-
corvaCompanyId: null,
|
|
4682
4679
|
externalChannels: {},
|
|
4683
|
-
serverNames: null,
|
|
4684
4680
|
isConnected: false,
|
|
4685
4681
|
hasEverConnected: false,
|
|
4686
4682
|
connectionGaveUp: false,
|
|
@@ -4710,7 +4706,6 @@ var authStore = createStore()((set, get) => ({
|
|
|
4710
4706
|
if (previous?.serverId === serverId && previous.companyId === companyId) return state;
|
|
4711
4707
|
return { externalChannels: { ...rest, [channelId]: { serverId, companyId } } };
|
|
4712
4708
|
}),
|
|
4713
|
-
setServerNames: (names) => set({ serverNames: names }),
|
|
4714
4709
|
markChatUsed: () => {
|
|
4715
4710
|
if (get().chatUsed === true) return;
|
|
4716
4711
|
set({ chatUsed: true });
|
|
@@ -4880,22 +4875,6 @@ var authStore = createStore()((set, get) => ({
|
|
|
4880
4875
|
isSocketConnected: () => !!sharedRefs.socket?.isConnected()
|
|
4881
4876
|
}));
|
|
4882
4877
|
var getExternalChannel = (roomId) => roomId && authStore.getState().externalChannels[roomId] || null;
|
|
4883
|
-
var waitForServerNames = (timeoutMs) => {
|
|
4884
|
-
const current = authStore.getState().serverNames;
|
|
4885
|
-
if (current) return Promise.resolve(current);
|
|
4886
|
-
return new Promise((resolve) => {
|
|
4887
|
-
const timer = setTimeout(() => {
|
|
4888
|
-
unsubscribe();
|
|
4889
|
-
resolve(null);
|
|
4890
|
-
}, timeoutMs);
|
|
4891
|
-
const unsubscribe = authStore.subscribe((state) => {
|
|
4892
|
-
if (!state.serverNames) return;
|
|
4893
|
-
clearTimeout(timer);
|
|
4894
|
-
unsubscribe();
|
|
4895
|
-
resolve(state.serverNames);
|
|
4896
|
-
});
|
|
4897
|
-
});
|
|
4898
|
-
};
|
|
4899
4878
|
var isExternalServerChannel = (roomId) => !!getExternalChannel(roomId);
|
|
4900
4879
|
var resetAuthStore = () => authStore.setState(getInitialState6());
|
|
4901
4880
|
|
|
@@ -5371,11 +5350,8 @@ var createSocketEventHandlers = (config) => {
|
|
|
5371
5350
|
onDisconnected: () => {
|
|
5372
5351
|
authStore.setState({ isConnected: false });
|
|
5373
5352
|
},
|
|
5374
|
-
onReady: (channels, channelUnreads
|
|
5353
|
+
onReady: (channels, channelUnreads) => {
|
|
5375
5354
|
if (!authStore.getState().user?._id) return;
|
|
5376
|
-
authStore.getState().setServerNames(
|
|
5377
|
-
(servers ?? []).map((server) => server.name).filter((name) => !!name)
|
|
5378
|
-
);
|
|
5379
5355
|
const channelLastMsg = /* @__PURE__ */ new Map();
|
|
5380
5356
|
channels.forEach((ch) => {
|
|
5381
5357
|
if (ch.last_message_id) {
|
|
@@ -5769,6 +5745,9 @@ var createSocketEventHandlers = (config) => {
|
|
|
5769
5745
|
);
|
|
5770
5746
|
memberStore.setState({ members: updatedMembers });
|
|
5771
5747
|
},
|
|
5748
|
+
onServerMembersChange: (serverId) => {
|
|
5749
|
+
memberStore.getState().refreshServerMembers(serverId);
|
|
5750
|
+
},
|
|
5772
5751
|
onInvalidSession: () => api.notifyUnauthorized("ws:Authenticate"),
|
|
5773
5752
|
onError: (error) => {
|
|
5774
5753
|
console.error("\u{1F50C} WebSocket error:", error);
|
|
@@ -5963,9 +5942,6 @@ async function handleUnauthorized() {
|
|
|
5963
5942
|
function ensureChatSession(corvaUser) {
|
|
5964
5943
|
lastCorvaUser = corvaUser;
|
|
5965
5944
|
initChat();
|
|
5966
|
-
if (authStore.getState().corvaCompanyId !== corvaUser.company_id) {
|
|
5967
|
-
authStore.setState({ corvaCompanyId: corvaUser.company_id ?? null });
|
|
5968
|
-
}
|
|
5969
5945
|
sharedRefs.api?.setUnauthorizedHandler(() => {
|
|
5970
5946
|
handleUnauthorized().catch((error) => console.error("Chat re-authentication failed", error));
|
|
5971
5947
|
});
|
|
@@ -5989,6 +5965,6 @@ function ensureChatSession(corvaUser) {
|
|
|
5989
5965
|
return inFlight;
|
|
5990
5966
|
}
|
|
5991
5967
|
|
|
5992
|
-
export { ALERT_SEVERITY, ASSET_API_FIELDS, ASSET_CHAT_PREFIXES, ASSET_NOUN, CHANNEL_NAME_MAX_LENGTH, CHANNEL_TYPES, CORVA_MESSAGE_TYPES, CORVA_SYS_PREFIX, DATE_SEPARATOR_LABELS, DEFAULT_CHANNEL_CONTENT_FILTER, DEFAULT_CHANNEL_CONTENT_FILTERS, DEFAULT_CHANNEL_PREFERENCE, DEFAULT_FAVORITE_ROOMS_SETTINGS, DEFAULT_HIDDEN_ROOMS_SETTINGS, DEFAULT_NOTIFICATION_PREFERENCES, DEFAULT_NOTIFICATION_SETTINGS, DEFAULT_ROOM_LIST_ORDER, DIRECT_MESSAGE_PLACEHOLDER, GENERAL_CHAT_NAME, HttpError, MAX_ATTACHMENT_SIZE_BYTES, MAX_ATTACHMENT_SIZE_MB, MAX_NAVIGATION_HISTORY, MENTION_REPLACE_PATTERN, MENTION_SPLIT_PATTERN, MUTE_PRESET_OPTIONS, NOTIFICATION_DESTINATIONS, NOTIFICATION_SETTING_ALL, NOTIFICATION_SETTING_MENTIONS, NOTIFICATION_SETTING_NOTHING, PAUSE_INDEFINITELY, PAUSE_PRESETS, PAUSE_PRESET_OPTIONS, REVOLT_SYSTEM_USER_ID, ROOM_LIST_ORDER, SESSION_STORAGE_KEY, SIDEBAR_SECTIONS, SIDEBAR_TABS, SOFT_DELETE_MARKER, SYSTEM_MESSAGE_TEXTS, SessionManager, WEBSOCKET_CONNECTING, WEBSOCKET_OPEN, addMessage, addOrUpdateSubscription, alertMessageAsText, assetStore, authStore, buildAppCommentMessageContent, buildAskCorvaMessageContent, buildFinalMessage, buildForwardMessageContent, buildGroupChannelName, canDeleteMessage, canEditMessage, channelContentFilterStore, channelToAsset, chatToastStore, clearLastOpenedRoom, compareByActivity, compareByName, compareByRecencyDesc, configureChat, configureChatStorage, createAckScheduler, createCorvaUserService, createDMSubscription, createGroupSubscription, createHttpClient, createLatestWinsQueue, createMemoryStorage, createMessageCache, createRevoltAPI, createRevoltSocket, createRoomTaskQueue, createSocketEventHandlers, createSoftDeletedMessage, createTypingManager, deriveAllowedChatAsset, enrichWithCorvaData, ensureChatSession, extractTimestampFromULID, failOptimisticMessage, favoriteRoomsStore, findGeneralRoom, formatAssetChatName, getAppCommentAttachments, getAssetChatChannel, getAssetChatSession, getAssetTypeFromDisplayName, getChatHost, getChatStorage, getCorvaUserFields, getExternalChannel, getLastOpenedRoom, getMessageTimestamp, getPauseUntil, getReactionCount, getRoomDisplayName, getSystemMessageWithCorvaNames, getUserDisplayName, getUserSecondaryText, handleUnauthorized, hasReactions, hasUserReacted, initChat, installUnreadWatcher, isAlertMessage, isAppCommentMessage, isAskCorvaMessage, isChannelMuted, isChatAssetTypeAllowed, isChatStorageConfigured, isCurrentRoomSelection, isDeepEqual, isDefaultChannelPreference, isDisallowedAssetChatRoom, isDmGroup, isExternalServerChannel, isForwardedMessage, isGeneralRoom, isNotificationsPaused, isPauseActive, isSoftDeletedMessage, isSystemMessage, isUnread, isUserOnline, isValidPausePreset, isVisibleUnread, keepChatUsed, loadUntilFound, memberStore, messageStore, navigationHistoryStore, notificationStore, onChatStorageConfigured, parseCorvaSystemMessage, prepareRoomSelection, removeMessageFromList, removeSubscription, resetAssetStore, resetAuthStore, resetChannelContentFilterStore, resetChatAssetPermissionsSnapshot, resetChatHost, resetFavoriteRoomsStore, resetMemberStore, resetMessageStore, resetNavigationHistoryStore, resetNotificationStore, resetRoomStore, resetUIStore, roomStore, saveLastChatActivity, saveLastOpenedRoom, searchMessages, searchRooms, searchUsers, selectCanGoBack, selectCanGoForward, setAllowedChatAssetTypes, settleOptimisticMessage, sharedRefs, sortChannels, sortDMs, sortMessagesByTime, sortUsersByStatus, stripPlatformMentions, uiStore, updateMessageInList, uploadAndSend, validateChannelName, waitForNextPaint,
|
|
5968
|
+
export { ALERT_SEVERITY, ASSET_API_FIELDS, ASSET_CHAT_PREFIXES, ASSET_NOUN, CHANNEL_NAME_MAX_LENGTH, CHANNEL_TYPES, CORVA_MESSAGE_TYPES, CORVA_SYS_PREFIX, DATE_SEPARATOR_LABELS, DEFAULT_CHANNEL_CONTENT_FILTER, DEFAULT_CHANNEL_CONTENT_FILTERS, DEFAULT_CHANNEL_PREFERENCE, DEFAULT_FAVORITE_ROOMS_SETTINGS, DEFAULT_HIDDEN_ROOMS_SETTINGS, DEFAULT_NOTIFICATION_PREFERENCES, DEFAULT_NOTIFICATION_SETTINGS, DEFAULT_ROOM_LIST_ORDER, DIRECT_MESSAGE_PLACEHOLDER, GENERAL_CHAT_NAME, HttpError, MAX_ATTACHMENT_SIZE_BYTES, MAX_ATTACHMENT_SIZE_MB, MAX_NAVIGATION_HISTORY, MENTION_REPLACE_PATTERN, MENTION_SPLIT_PATTERN, MUTE_PRESET_OPTIONS, NOTIFICATION_DESTINATIONS, NOTIFICATION_SETTING_ALL, NOTIFICATION_SETTING_MENTIONS, NOTIFICATION_SETTING_NOTHING, PAUSE_INDEFINITELY, PAUSE_PRESETS, PAUSE_PRESET_OPTIONS, REVOLT_SYSTEM_USER_ID, ROOM_LIST_ORDER, SESSION_STORAGE_KEY, SIDEBAR_SECTIONS, SIDEBAR_TABS, SOFT_DELETE_MARKER, SYSTEM_MESSAGE_TEXTS, SessionManager, WEBSOCKET_CONNECTING, WEBSOCKET_OPEN, addMessage, addOrUpdateSubscription, alertMessageAsText, assetStore, authStore, buildAppCommentMessageContent, buildAskCorvaMessageContent, buildFinalMessage, buildForwardMessageContent, buildGroupChannelName, canDeleteMessage, canEditMessage, channelContentFilterStore, channelToAsset, chatToastStore, clearLastOpenedRoom, compareByActivity, compareByName, compareByRecencyDesc, configureChat, configureChatStorage, createAckScheduler, createCorvaUserService, createDMSubscription, createGroupSubscription, createHttpClient, createLatestWinsQueue, createMemoryStorage, createMessageCache, createRevoltAPI, createRevoltSocket, createRoomTaskQueue, createSocketEventHandlers, createSoftDeletedMessage, createTypingManager, deriveAllowedChatAsset, enrichWithCorvaData, ensureChatSession, extractTimestampFromULID, failOptimisticMessage, favoriteRoomsStore, findGeneralRoom, formatAssetChatName, getAppCommentAttachments, getAssetChatChannel, getAssetChatSession, getAssetTypeFromDisplayName, getChatHost, getChatStorage, getCorvaUserFields, getExternalChannel, getLastOpenedRoom, getMessageTimestamp, getPauseUntil, getReactionCount, getRoomDisplayName, getSystemMessageWithCorvaNames, getUserDisplayName, getUserSecondaryText, handleUnauthorized, hasReactions, hasUserReacted, initChat, installUnreadWatcher, isAlertMessage, isAppCommentMessage, isAskCorvaMessage, isChannelMuted, isChatAssetTypeAllowed, isChatStorageConfigured, isCurrentRoomSelection, isDeepEqual, isDefaultChannelPreference, isDisallowedAssetChatRoom, isDmGroup, isExternalServerChannel, isForwardedMessage, isGeneralRoom, isNotificationsPaused, isPauseActive, isSoftDeletedMessage, isSystemMessage, isUnread, isUserOnline, isValidPausePreset, isVisibleUnread, keepChatUsed, loadUntilFound, memberStore, messageStore, navigationHistoryStore, notificationStore, onChatStorageConfigured, parseCorvaSystemMessage, prepareRoomSelection, removeMessageFromList, removeSubscription, resetAssetStore, resetAuthStore, resetChannelContentFilterStore, resetChatAssetPermissionsSnapshot, resetChatHost, resetFavoriteRoomsStore, resetMemberStore, resetMessageStore, resetNavigationHistoryStore, resetNotificationStore, resetRoomStore, resetUIStore, roomStore, saveLastChatActivity, saveLastOpenedRoom, searchMessages, searchRooms, searchUsers, selectCanGoBack, selectCanGoForward, setAllowedChatAssetTypes, settleOptimisticMessage, sharedRefs, sortChannels, sortDMs, sortMessagesByTime, sortUsersByStatus, stripPlatformMentions, uiStore, updateMessageInList, uploadAndSend, validateChannelName, waitForNextPaint, wasRecentlyActive, withChannelPreferenceDefaults };
|
|
5993
5969
|
//# sourceMappingURL=index.js.map
|
|
5994
5970
|
//# sourceMappingURL=index.js.map
|