2020-10-30 20:34:04 +00:00
|
|
|
// Copyright 2018-2020 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2018-05-05 01:57:11 +00:00
|
|
|
// The idea with this file is to make it webpackable for the style guide
|
|
|
|
|
2019-01-14 21:49:58 +00:00
|
|
|
const { bindActionCreators } = require('redux');
|
2018-05-23 18:09:37 +00:00
|
|
|
const Backbone = require('../../ts/backbone');
|
2020-03-31 20:03:38 +00:00
|
|
|
const Crypto = require('../../ts/Crypto');
|
2020-07-10 18:28:49 +00:00
|
|
|
const {
|
|
|
|
start: conversationControllerStart,
|
|
|
|
} = require('../../ts/ConversationController');
|
2020-04-01 18:59:11 +00:00
|
|
|
const Data = require('../../ts/sql/Client').default;
|
2019-05-24 23:58:27 +00:00
|
|
|
const Emojis = require('./emojis');
|
2019-06-21 00:48:54 +00:00
|
|
|
const EmojiLib = require('../../ts/components/emoji/lib');
|
2020-09-09 02:25:05 +00:00
|
|
|
const Groups = require('../../ts/groups');
|
|
|
|
const GroupChange = require('../../ts/groupChange');
|
2018-10-18 01:01:21 +00:00
|
|
|
const IndexedDB = require('./indexeddb');
|
2018-05-23 18:09:37 +00:00
|
|
|
const Notifications = require('../../ts/notifications');
|
|
|
|
const OS = require('../../ts/OS');
|
2019-05-16 22:32:11 +00:00
|
|
|
const Stickers = require('./stickers');
|
2018-05-23 18:09:37 +00:00
|
|
|
const Settings = require('./settings');
|
2020-05-27 21:37:06 +00:00
|
|
|
const RemoteConfig = require('../../ts/RemoteConfig');
|
2018-05-23 18:09:37 +00:00
|
|
|
const Util = require('../../ts/util');
|
2018-10-18 01:01:21 +00:00
|
|
|
const RefreshSenderCertificate = require('./refresh_sender_certificate');
|
2019-01-16 03:03:56 +00:00
|
|
|
const LinkPreviews = require('./link_previews');
|
2019-01-30 20:15:07 +00:00
|
|
|
const AttachmentDownloads = require('./attachment_downloads');
|
2018-05-05 01:57:11 +00:00
|
|
|
|
|
|
|
// Components
|
2018-12-02 01:48:53 +00:00
|
|
|
const {
|
|
|
|
AttachmentList,
|
|
|
|
} = require('../../ts/components/conversation/AttachmentList');
|
|
|
|
const { CaptionEditor } = require('../../ts/components/CaptionEditor');
|
2020-10-06 17:06:34 +00:00
|
|
|
const { ConfirmationModal } = require('../../ts/components/ConfirmationModal');
|
2018-05-05 01:57:11 +00:00
|
|
|
const {
|
|
|
|
ContactDetail,
|
2018-05-23 18:09:37 +00:00
|
|
|
} = require('../../ts/components/conversation/ContactDetail');
|
2018-06-27 20:53:49 +00:00
|
|
|
const { ContactListItem } = require('../../ts/components/ContactListItem');
|
2020-11-11 17:36:05 +00:00
|
|
|
const {
|
|
|
|
ContactModal,
|
|
|
|
} = require('../../ts/components/conversation/ContactModal');
|
2018-05-23 18:09:37 +00:00
|
|
|
const { Emojify } = require('../../ts/components/conversation/Emojify');
|
2020-10-06 17:06:34 +00:00
|
|
|
const { ErrorModal } = require('../../ts/components/ErrorModal');
|
2018-05-23 18:09:37 +00:00
|
|
|
const { Lightbox } = require('../../ts/components/Lightbox');
|
|
|
|
const { LightboxGallery } = require('../../ts/components/LightboxGallery');
|
2018-05-05 01:57:11 +00:00
|
|
|
const {
|
|
|
|
MediaGallery,
|
2018-05-23 18:09:37 +00:00
|
|
|
} = require('../../ts/components/conversation/media-gallery/MediaGallery');
|
2018-07-09 21:29:13 +00:00
|
|
|
const {
|
|
|
|
MessageDetail,
|
|
|
|
} = require('../../ts/components/conversation/MessageDetail');
|
2018-05-23 18:09:37 +00:00
|
|
|
const { Quote } = require('../../ts/components/conversation/Quote');
|
2020-10-06 17:06:34 +00:00
|
|
|
const { ProgressModal } = require('../../ts/components/ProgressModal');
|
2020-06-26 00:08:58 +00:00
|
|
|
const {
|
|
|
|
SafetyNumberChangeDialog,
|
|
|
|
} = require('../../ts/components/SafetyNumberChangeDialog');
|
2019-01-16 03:03:56 +00:00
|
|
|
const {
|
|
|
|
StagedLinkPreview,
|
|
|
|
} = require('../../ts/components/conversation/StagedLinkPreview');
|
2018-05-05 01:57:11 +00:00
|
|
|
|
2019-01-14 21:49:58 +00:00
|
|
|
// State
|
2019-05-31 22:42:01 +00:00
|
|
|
const { createTimeline } = require('../../ts/state/roots/createTimeline');
|
2019-05-16 22:32:11 +00:00
|
|
|
const {
|
2019-06-27 20:35:21 +00:00
|
|
|
createCompositionArea,
|
|
|
|
} = require('../../ts/state/roots/createCompositionArea');
|
2020-11-11 17:36:05 +00:00
|
|
|
const {
|
|
|
|
createContactModal,
|
|
|
|
} = require('../../ts/state/roots/createContactModal');
|
2021-01-29 21:19:24 +00:00
|
|
|
const {
|
|
|
|
createConversationDetails,
|
|
|
|
} = require('../../ts/state/roots/createConversationDetails');
|
2020-10-30 17:52:21 +00:00
|
|
|
const {
|
|
|
|
createConversationHeader,
|
|
|
|
} = require('../../ts/state/roots/createConversationHeader');
|
2020-06-04 18:16:19 +00:00
|
|
|
const { createCallManager } = require('../../ts/state/roots/createCallManager');
|
2021-01-29 21:19:24 +00:00
|
|
|
const {
|
|
|
|
createGroupLinkManagement,
|
|
|
|
} = require('../../ts/state/roots/createGroupLinkManagement');
|
2020-12-01 16:42:35 +00:00
|
|
|
const {
|
|
|
|
createGroupV1MigrationModal,
|
|
|
|
} = require('../../ts/state/roots/createGroupV1MigrationModal');
|
2021-01-29 22:16:48 +00:00
|
|
|
const {
|
|
|
|
createGroupV2JoinModal,
|
|
|
|
} = require('../../ts/state/roots/createGroupV2JoinModal');
|
2019-06-27 20:35:21 +00:00
|
|
|
const { createLeftPane } = require('../../ts/state/roots/createLeftPane');
|
2021-01-29 21:19:24 +00:00
|
|
|
const {
|
|
|
|
createGroupV2Permissions,
|
|
|
|
} = require('../../ts/state/roots/createGroupV2Permissions');
|
|
|
|
const {
|
|
|
|
createPendingInvites,
|
|
|
|
} = require('../../ts/state/roots/createPendingInvites');
|
2020-06-26 00:08:58 +00:00
|
|
|
const {
|
|
|
|
createSafetyNumberViewer,
|
|
|
|
} = require('../../ts/state/roots/createSafetyNumberViewer');
|
2019-05-16 22:32:11 +00:00
|
|
|
const {
|
|
|
|
createStickerManager,
|
|
|
|
} = require('../../ts/state/roots/createStickerManager');
|
|
|
|
const {
|
|
|
|
createStickerPreviewModal,
|
|
|
|
} = require('../../ts/state/roots/createStickerPreviewModal');
|
2019-11-07 21:36:16 +00:00
|
|
|
const {
|
|
|
|
createShortcutGuideModal,
|
|
|
|
} = require('../../ts/state/roots/createShortcutGuideModal');
|
2019-05-16 22:32:11 +00:00
|
|
|
|
2019-01-14 21:49:58 +00:00
|
|
|
const { createStore } = require('../../ts/state/createStore');
|
2020-06-04 18:16:19 +00:00
|
|
|
const callingDuck = require('../../ts/state/ducks/calling');
|
2019-01-14 21:49:58 +00:00
|
|
|
const conversationsDuck = require('../../ts/state/ducks/conversations');
|
2019-05-24 23:58:27 +00:00
|
|
|
const emojisDuck = require('../../ts/state/ducks/emojis');
|
2020-02-12 21:30:58 +00:00
|
|
|
const expirationDuck = require('../../ts/state/ducks/expiration');
|
2019-05-16 22:32:11 +00:00
|
|
|
const itemsDuck = require('../../ts/state/ducks/items');
|
2020-02-12 21:30:58 +00:00
|
|
|
const networkDuck = require('../../ts/state/ducks/network');
|
2019-08-09 23:12:29 +00:00
|
|
|
const searchDuck = require('../../ts/state/ducks/search');
|
2019-05-16 22:32:11 +00:00
|
|
|
const stickersDuck = require('../../ts/state/ducks/stickers');
|
2020-02-12 21:30:58 +00:00
|
|
|
const updatesDuck = require('../../ts/state/ducks/updates');
|
2019-01-14 21:49:58 +00:00
|
|
|
const userDuck = require('../../ts/state/ducks/user');
|
|
|
|
|
2019-11-07 21:36:16 +00:00
|
|
|
const conversationsSelectors = require('../../ts/state/selectors/conversations');
|
2019-11-15 00:29:39 +00:00
|
|
|
const searchSelectors = require('../../ts/state/selectors/search');
|
2019-11-07 21:36:16 +00:00
|
|
|
|
2018-05-05 01:57:11 +00:00
|
|
|
// Types
|
2018-05-23 18:09:37 +00:00
|
|
|
const AttachmentType = require('./types/attachment');
|
2018-07-09 21:29:13 +00:00
|
|
|
const VisualAttachment = require('./types/visual_attachment');
|
2018-05-23 18:09:37 +00:00
|
|
|
const Contact = require('../../ts/types/Contact');
|
2018-09-21 01:47:19 +00:00
|
|
|
const Conversation = require('./types/conversation');
|
2018-05-23 18:09:37 +00:00
|
|
|
const Errors = require('./types/errors');
|
|
|
|
const MediaGalleryMessage = require('../../ts/components/conversation/media-gallery/types/Message');
|
2018-07-09 21:29:13 +00:00
|
|
|
const MessageType = require('./types/message');
|
2018-05-23 18:09:37 +00:00
|
|
|
const MIME = require('../../ts/types/MIME');
|
2018-07-09 21:29:13 +00:00
|
|
|
const PhoneNumber = require('../../ts/types/PhoneNumber');
|
2018-05-23 18:09:37 +00:00
|
|
|
const SettingsType = require('../../ts/types/Settings');
|
2018-05-05 01:57:11 +00:00
|
|
|
|
|
|
|
// Views
|
2018-05-23 18:09:37 +00:00
|
|
|
const Initialization = require('./views/initialization');
|
2018-05-05 01:57:11 +00:00
|
|
|
|
|
|
|
// Workflow
|
2018-05-23 18:09:37 +00:00
|
|
|
const { IdleDetector } = require('./idle_detector');
|
|
|
|
const MessageDataMigrator = require('./messages_data_migrator');
|
2018-05-05 01:57:11 +00:00
|
|
|
|
2020-02-12 21:30:58 +00:00
|
|
|
// Processes / Services
|
2020-09-09 02:25:05 +00:00
|
|
|
const {
|
|
|
|
initializeGroupCredentialFetcher,
|
|
|
|
} = require('../../ts/services/groupCredentialFetcher');
|
2020-02-12 21:30:58 +00:00
|
|
|
const {
|
|
|
|
initializeNetworkObserver,
|
|
|
|
} = require('../../ts/services/networkObserver');
|
|
|
|
const {
|
|
|
|
initializeUpdateListener,
|
|
|
|
} = require('../../ts/services/updateListener');
|
2020-06-04 18:16:19 +00:00
|
|
|
const { notify } = require('../../ts/services/notify');
|
|
|
|
const { calling } = require('../../ts/services/calling');
|
2020-10-01 00:43:24 +00:00
|
|
|
const { onTimeout, removeTimeout } = require('../../ts/services/timers');
|
2020-09-09 00:56:23 +00:00
|
|
|
const {
|
2020-09-29 23:29:11 +00:00
|
|
|
enableStorageService,
|
2020-09-09 00:56:23 +00:00
|
|
|
eraseAllStorageServiceState,
|
|
|
|
runStorageServiceSyncJob,
|
|
|
|
storageServiceUploadJob,
|
|
|
|
} = require('../../ts/services/storage');
|
2020-02-12 21:30:58 +00:00
|
|
|
|
2018-07-03 22:33:50 +00:00
|
|
|
function initializeMigrations({
|
|
|
|
userDataPath,
|
|
|
|
getRegionCode,
|
2018-07-09 21:29:13 +00:00
|
|
|
Attachments,
|
|
|
|
Type,
|
|
|
|
VisualType,
|
2018-07-21 19:00:08 +00:00
|
|
|
logger,
|
2018-07-03 22:33:50 +00:00
|
|
|
}) {
|
|
|
|
if (!Attachments) {
|
|
|
|
return null;
|
|
|
|
}
|
2018-07-09 21:29:13 +00:00
|
|
|
const {
|
2019-08-07 00:40:25 +00:00
|
|
|
createAbsolutePathGetter,
|
|
|
|
createReader,
|
|
|
|
createWriterForExisting,
|
|
|
|
createWriterForNew,
|
2019-12-03 20:02:50 +00:00
|
|
|
createDoesExist,
|
2019-08-07 00:40:25 +00:00
|
|
|
getDraftPath,
|
2018-07-09 21:29:13 +00:00
|
|
|
getPath,
|
2019-05-16 22:32:11 +00:00
|
|
|
getStickersPath,
|
2019-05-24 01:27:42 +00:00
|
|
|
getTempPath,
|
2020-01-15 22:23:02 +00:00
|
|
|
openFileInFolder,
|
|
|
|
saveAttachmentToDisk,
|
2018-07-09 21:29:13 +00:00
|
|
|
} = Attachments;
|
|
|
|
const {
|
|
|
|
getImageDimensions,
|
|
|
|
makeImageThumbnail,
|
2019-08-07 00:40:25 +00:00
|
|
|
makeObjectUrl,
|
2018-07-09 21:29:13 +00:00
|
|
|
makeVideoScreenshot,
|
2019-08-07 00:40:25 +00:00
|
|
|
revokeObjectUrl,
|
2018-07-09 21:29:13 +00:00
|
|
|
} = VisualType;
|
|
|
|
|
|
|
|
const attachmentsPath = getPath(userDataPath);
|
|
|
|
const readAttachmentData = createReader(attachmentsPath);
|
2018-07-03 22:33:50 +00:00
|
|
|
const loadAttachmentData = Type.loadData(readAttachmentData);
|
2019-01-28 23:24:19 +00:00
|
|
|
const loadPreviewData = MessageType.loadPreviewData(loadAttachmentData);
|
|
|
|
const loadQuoteData = MessageType.loadQuoteData(loadAttachmentData);
|
2019-05-16 22:32:11 +00:00
|
|
|
const loadStickerData = MessageType.loadStickerData(loadAttachmentData);
|
2018-07-09 21:29:13 +00:00
|
|
|
const getAbsoluteAttachmentPath = createAbsolutePathGetter(attachmentsPath);
|
2018-07-24 18:55:24 +00:00
|
|
|
const deleteOnDisk = Attachments.createDeleter(attachmentsPath);
|
2019-01-30 20:15:07 +00:00
|
|
|
const writeNewAttachmentData = createWriterForNew(attachmentsPath);
|
2019-05-16 22:32:11 +00:00
|
|
|
const copyIntoAttachmentsDirectory = Attachments.copyIntoAttachmentsDirectory(
|
|
|
|
attachmentsPath
|
|
|
|
);
|
2019-12-03 20:02:50 +00:00
|
|
|
const doesAttachmentExist = createDoesExist(attachmentsPath);
|
2019-05-16 22:32:11 +00:00
|
|
|
|
|
|
|
const stickersPath = getStickersPath(userDataPath);
|
|
|
|
const writeNewStickerData = createWriterForNew(stickersPath);
|
|
|
|
const getAbsoluteStickerPath = createAbsolutePathGetter(stickersPath);
|
|
|
|
const deleteSticker = Attachments.createDeleter(stickersPath);
|
|
|
|
const readStickerData = createReader(stickersPath);
|
2018-05-05 01:57:11 +00:00
|
|
|
|
2019-05-24 01:27:42 +00:00
|
|
|
const tempPath = getTempPath(userDataPath);
|
|
|
|
const getAbsoluteTempPath = createAbsolutePathGetter(tempPath);
|
|
|
|
const writeNewTempData = createWriterForNew(tempPath);
|
|
|
|
const deleteTempFile = Attachments.createDeleter(tempPath);
|
|
|
|
const readTempData = createReader(tempPath);
|
2019-08-05 20:53:15 +00:00
|
|
|
const copyIntoTempDirectory = Attachments.copyIntoAttachmentsDirectory(
|
|
|
|
tempPath
|
|
|
|
);
|
2019-05-24 01:27:42 +00:00
|
|
|
|
2019-08-07 00:40:25 +00:00
|
|
|
const draftPath = getDraftPath(userDataPath);
|
|
|
|
const getAbsoluteDraftPath = createAbsolutePathGetter(draftPath);
|
|
|
|
const writeNewDraftData = createWriterForNew(draftPath);
|
|
|
|
const deleteDraftFile = Attachments.createDeleter(draftPath);
|
|
|
|
const readDraftData = createReader(draftPath);
|
|
|
|
|
2018-07-03 22:33:50 +00:00
|
|
|
return {
|
2018-05-05 01:57:11 +00:00
|
|
|
attachmentsPath,
|
2019-05-16 22:32:11 +00:00
|
|
|
copyIntoAttachmentsDirectory,
|
2019-08-05 20:53:15 +00:00
|
|
|
copyIntoTempDirectory,
|
2018-10-24 18:31:01 +00:00
|
|
|
deleteAttachmentData: deleteOnDisk,
|
2019-08-07 00:40:25 +00:00
|
|
|
deleteDraftFile,
|
2018-07-24 18:55:24 +00:00
|
|
|
deleteExternalMessageFiles: MessageType.deleteAllExternalFiles({
|
|
|
|
deleteAttachmentData: Type.deleteData(deleteOnDisk),
|
|
|
|
deleteOnDisk,
|
|
|
|
}),
|
2019-05-16 22:32:11 +00:00
|
|
|
deleteSticker,
|
2019-05-24 01:27:42 +00:00
|
|
|
deleteTempFile,
|
2019-12-03 20:02:50 +00:00
|
|
|
doesAttachmentExist,
|
2018-07-09 21:29:13 +00:00
|
|
|
getAbsoluteAttachmentPath,
|
2019-08-07 00:40:25 +00:00
|
|
|
getAbsoluteDraftPath,
|
2019-05-16 22:32:11 +00:00
|
|
|
getAbsoluteStickerPath,
|
2019-08-05 20:53:15 +00:00
|
|
|
getAbsoluteTempPath,
|
2018-05-05 01:57:11 +00:00
|
|
|
loadAttachmentData,
|
2018-07-09 21:29:13 +00:00
|
|
|
loadMessage: MessageType.createAttachmentLoader(loadAttachmentData),
|
2019-01-16 03:03:56 +00:00
|
|
|
loadPreviewData,
|
|
|
|
loadQuoteData,
|
2019-05-16 22:32:11 +00:00
|
|
|
loadStickerData,
|
2020-01-15 22:23:02 +00:00
|
|
|
openFileInFolder,
|
2018-12-13 21:41:42 +00:00
|
|
|
readAttachmentData,
|
2019-08-07 00:40:25 +00:00
|
|
|
readDraftData,
|
2019-05-16 22:32:11 +00:00
|
|
|
readStickerData,
|
2019-05-24 01:27:42 +00:00
|
|
|
readTempData,
|
2020-01-15 22:23:02 +00:00
|
|
|
saveAttachmentToDisk,
|
2019-01-30 20:15:07 +00:00
|
|
|
processNewAttachment: attachment =>
|
|
|
|
MessageType.processNewAttachment(attachment, {
|
|
|
|
writeNewAttachmentData,
|
|
|
|
getAbsoluteAttachmentPath,
|
|
|
|
makeObjectUrl,
|
|
|
|
revokeObjectUrl,
|
|
|
|
getImageDimensions,
|
|
|
|
makeImageThumbnail,
|
|
|
|
makeVideoScreenshot,
|
|
|
|
logger,
|
|
|
|
}),
|
2019-05-16 22:32:11 +00:00
|
|
|
processNewSticker: stickerData =>
|
|
|
|
MessageType.processNewSticker(stickerData, {
|
|
|
|
writeNewStickerData,
|
|
|
|
getAbsoluteStickerPath,
|
|
|
|
getImageDimensions,
|
|
|
|
logger,
|
|
|
|
}),
|
2019-05-24 01:27:42 +00:00
|
|
|
processNewEphemeralSticker: stickerData =>
|
|
|
|
MessageType.processNewSticker(stickerData, {
|
|
|
|
writeNewStickerData: writeNewTempData,
|
|
|
|
getAbsoluteStickerPath: getAbsoluteTempPath,
|
|
|
|
getImageDimensions,
|
|
|
|
logger,
|
|
|
|
}),
|
2018-07-27 02:19:34 +00:00
|
|
|
upgradeMessageSchema: (message, options = {}) => {
|
|
|
|
const { maxVersion } = options;
|
|
|
|
|
|
|
|
return MessageType.upgradeSchema(message, {
|
2019-01-30 20:15:07 +00:00
|
|
|
writeNewAttachmentData,
|
2018-05-09 01:03:02 +00:00
|
|
|
getRegionCode,
|
2018-07-09 21:29:13 +00:00
|
|
|
getAbsoluteAttachmentPath,
|
|
|
|
makeObjectUrl,
|
|
|
|
revokeObjectUrl,
|
|
|
|
getImageDimensions,
|
|
|
|
makeImageThumbnail,
|
|
|
|
makeVideoScreenshot,
|
2018-07-21 19:00:08 +00:00
|
|
|
logger,
|
2018-07-27 02:19:34 +00:00
|
|
|
maxVersion,
|
|
|
|
});
|
|
|
|
},
|
2018-07-21 19:00:08 +00:00
|
|
|
writeMessageAttachments: MessageType.createAttachmentDataWriter({
|
|
|
|
writeExistingAttachmentData: createWriterForExisting(attachmentsPath),
|
|
|
|
logger,
|
|
|
|
}),
|
2018-10-24 18:31:01 +00:00
|
|
|
writeNewAttachmentData: createWriterForNew(attachmentsPath),
|
2019-08-07 00:40:25 +00:00
|
|
|
writeNewDraftData,
|
2018-05-05 01:57:11 +00:00
|
|
|
};
|
2018-07-03 22:33:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
exports.setup = (options = {}) => {
|
2018-07-21 19:00:08 +00:00
|
|
|
const { Attachments, userDataPath, getRegionCode, logger } = options;
|
2018-07-03 22:33:50 +00:00
|
|
|
|
|
|
|
const Migrations = initializeMigrations({
|
|
|
|
userDataPath,
|
|
|
|
getRegionCode,
|
2018-07-09 21:29:13 +00:00
|
|
|
Attachments,
|
|
|
|
Type: AttachmentType,
|
|
|
|
VisualType: VisualAttachment,
|
2018-07-21 19:00:08 +00:00
|
|
|
logger,
|
2018-07-03 22:33:50 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
const Components = {
|
2018-12-02 01:48:53 +00:00
|
|
|
AttachmentList,
|
|
|
|
CaptionEditor,
|
2020-10-06 17:06:34 +00:00
|
|
|
ConfirmationModal,
|
2018-07-03 22:33:50 +00:00
|
|
|
ContactDetail,
|
2018-06-27 20:53:49 +00:00
|
|
|
ContactListItem,
|
2020-11-11 17:36:05 +00:00
|
|
|
ContactModal,
|
2018-07-03 22:33:50 +00:00
|
|
|
Emojify,
|
2020-10-06 17:06:34 +00:00
|
|
|
ErrorModal,
|
2018-07-03 22:33:50 +00:00
|
|
|
Lightbox,
|
|
|
|
LightboxGallery,
|
|
|
|
MediaGallery,
|
2018-07-09 21:29:13 +00:00
|
|
|
MessageDetail,
|
|
|
|
Quote,
|
2020-10-06 17:06:34 +00:00
|
|
|
ProgressModal,
|
2020-06-26 00:08:58 +00:00
|
|
|
SafetyNumberChangeDialog,
|
2019-01-16 03:03:56 +00:00
|
|
|
StagedLinkPreview,
|
2018-07-03 22:33:50 +00:00
|
|
|
Types: {
|
|
|
|
Message: MediaGalleryMessage,
|
|
|
|
},
|
|
|
|
};
|
2018-05-05 01:57:11 +00:00
|
|
|
|
2019-01-14 21:49:58 +00:00
|
|
|
const Roots = {
|
2020-06-04 18:16:19 +00:00
|
|
|
createCallManager,
|
2019-06-27 20:35:21 +00:00
|
|
|
createCompositionArea,
|
2020-11-11 17:36:05 +00:00
|
|
|
createContactModal,
|
2021-01-29 21:19:24 +00:00
|
|
|
createConversationDetails,
|
2020-10-30 17:52:21 +00:00
|
|
|
createConversationHeader,
|
2021-01-29 21:19:24 +00:00
|
|
|
createGroupLinkManagement,
|
2020-12-01 16:42:35 +00:00
|
|
|
createGroupV1MigrationModal,
|
2021-01-29 22:16:48 +00:00
|
|
|
createGroupV2JoinModal,
|
2021-01-29 21:19:24 +00:00
|
|
|
createGroupV2Permissions,
|
2019-01-14 21:49:58 +00:00
|
|
|
createLeftPane,
|
2021-01-29 21:19:24 +00:00
|
|
|
createPendingInvites,
|
2020-06-26 00:08:58 +00:00
|
|
|
createSafetyNumberViewer,
|
2019-11-07 21:36:16 +00:00
|
|
|
createShortcutGuideModal,
|
2019-05-16 22:32:11 +00:00
|
|
|
createStickerManager,
|
|
|
|
createStickerPreviewModal,
|
2019-11-07 21:36:16 +00:00
|
|
|
createTimeline,
|
2019-01-14 21:49:58 +00:00
|
|
|
};
|
2020-02-12 21:30:58 +00:00
|
|
|
|
2019-01-14 21:49:58 +00:00
|
|
|
const Ducks = {
|
2020-06-04 18:16:19 +00:00
|
|
|
calling: callingDuck,
|
2019-01-14 21:49:58 +00:00
|
|
|
conversations: conversationsDuck,
|
2019-05-24 23:58:27 +00:00
|
|
|
emojis: emojisDuck,
|
2020-02-12 21:30:58 +00:00
|
|
|
expiration: expirationDuck,
|
2019-05-16 22:32:11 +00:00
|
|
|
items: itemsDuck,
|
2020-02-12 21:30:58 +00:00
|
|
|
network: networkDuck,
|
|
|
|
updates: updatesDuck,
|
2019-01-14 21:49:58 +00:00
|
|
|
user: userDuck,
|
2019-08-09 23:12:29 +00:00
|
|
|
search: searchDuck,
|
2019-05-16 22:32:11 +00:00
|
|
|
stickers: stickersDuck,
|
2019-01-14 21:49:58 +00:00
|
|
|
};
|
2020-02-12 21:30:58 +00:00
|
|
|
|
2019-11-07 21:36:16 +00:00
|
|
|
const Selectors = {
|
|
|
|
conversations: conversationsSelectors,
|
2019-11-15 00:29:39 +00:00
|
|
|
search: searchSelectors,
|
2019-11-07 21:36:16 +00:00
|
|
|
};
|
|
|
|
|
2020-02-12 21:30:58 +00:00
|
|
|
const Services = {
|
2020-09-09 00:56:23 +00:00
|
|
|
calling,
|
2020-09-29 23:29:11 +00:00
|
|
|
enableStorageService,
|
2020-09-09 00:56:23 +00:00
|
|
|
eraseAllStorageServiceState,
|
2020-09-09 02:25:05 +00:00
|
|
|
initializeGroupCredentialFetcher,
|
2020-02-12 21:30:58 +00:00
|
|
|
initializeNetworkObserver,
|
|
|
|
initializeUpdateListener,
|
2020-10-01 00:43:24 +00:00
|
|
|
onTimeout,
|
2020-06-04 18:16:19 +00:00
|
|
|
notify,
|
2020-10-01 00:43:24 +00:00
|
|
|
removeTimeout,
|
2020-09-09 00:56:23 +00:00
|
|
|
runStorageServiceSyncJob,
|
|
|
|
storageServiceUploadJob,
|
2020-02-12 21:30:58 +00:00
|
|
|
};
|
|
|
|
|
2019-01-14 21:49:58 +00:00
|
|
|
const State = {
|
|
|
|
bindActionCreators,
|
|
|
|
createStore,
|
|
|
|
Roots,
|
|
|
|
Ducks,
|
2019-11-07 21:36:16 +00:00
|
|
|
Selectors,
|
2019-01-14 21:49:58 +00:00
|
|
|
};
|
|
|
|
|
2018-05-05 01:57:11 +00:00
|
|
|
const Types = {
|
|
|
|
Attachment: AttachmentType,
|
|
|
|
Contact,
|
|
|
|
Conversation,
|
|
|
|
Errors,
|
2018-07-09 21:29:13 +00:00
|
|
|
Message: MessageType,
|
2018-05-05 01:57:11 +00:00
|
|
|
MIME,
|
2018-07-09 21:29:13 +00:00
|
|
|
PhoneNumber,
|
2018-05-05 01:57:11 +00:00
|
|
|
Settings: SettingsType,
|
2018-07-09 21:29:13 +00:00
|
|
|
VisualAttachment,
|
2018-05-05 01:57:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const Views = {
|
|
|
|
Initialization,
|
|
|
|
};
|
|
|
|
|
|
|
|
const Workflow = {
|
|
|
|
IdleDetector,
|
|
|
|
MessageDataMigrator,
|
|
|
|
};
|
|
|
|
|
|
|
|
return {
|
2019-01-30 20:15:07 +00:00
|
|
|
AttachmentDownloads,
|
2018-05-05 01:57:11 +00:00
|
|
|
Backbone,
|
|
|
|
Components,
|
|
|
|
Crypto,
|
2020-07-10 18:28:49 +00:00
|
|
|
conversationControllerStart,
|
2018-07-25 22:02:27 +00:00
|
|
|
Data,
|
2019-05-24 23:58:27 +00:00
|
|
|
Emojis,
|
2019-06-21 00:48:54 +00:00
|
|
|
EmojiLib,
|
2020-09-09 02:25:05 +00:00
|
|
|
Groups,
|
|
|
|
GroupChange,
|
2018-10-18 01:01:21 +00:00
|
|
|
IndexedDB,
|
2019-01-16 03:03:56 +00:00
|
|
|
LinkPreviews,
|
2018-05-05 01:57:11 +00:00
|
|
|
Migrations,
|
|
|
|
Notifications,
|
|
|
|
OS,
|
2018-10-18 01:01:21 +00:00
|
|
|
RefreshSenderCertificate,
|
2020-05-27 21:37:06 +00:00
|
|
|
RemoteConfig,
|
2018-05-05 01:57:11 +00:00
|
|
|
Settings,
|
2020-02-12 21:30:58 +00:00
|
|
|
Services,
|
2019-01-14 21:49:58 +00:00
|
|
|
State,
|
2019-05-16 22:32:11 +00:00
|
|
|
Stickers,
|
2018-05-05 01:57:11 +00:00
|
|
|
Types,
|
|
|
|
Util,
|
|
|
|
Views,
|
|
|
|
Workflow,
|
|
|
|
};
|
|
|
|
};
|