diff --git a/background.html b/background.html
index a91a5c510..a1e945eeb 100644
--- a/background.html
+++ b/background.html
@@ -214,8 +214,6 @@
-
-
diff --git a/background_test.html b/background_test.html
index 5302bfbd1..1580054fa 100644
--- a/background_test.html
+++ b/background_test.html
@@ -216,8 +216,6 @@
-
-
diff --git a/js/background.js b/js/background.js
index 46aeea580..37b4f4aae 100644
--- a/js/background.js
+++ b/js/background.js
@@ -919,23 +919,6 @@
return conversation;
};
- window.sendGroupInvitations = (serverInfo, pubkeys) => {
- pubkeys.forEach(async pubkeyStr => {
- const convo = await ConversationController.getOrCreateAndWait(
- pubkeyStr,
- 'private'
- );
-
- if (convo) {
- convo.sendMessage('', null, null, null, {
- serverName: serverInfo.name,
- channelId: serverInfo.channelId,
- serverAddress: serverInfo.address,
- });
- }
- });
- };
-
Whisper.events.on('updateGroupName', async groupConvo => {
if (appView) {
appView.showUpdateGroupNameDialog(groupConvo);
diff --git a/js/modules/signal.js b/js/modules/signal.js
index 6448a786c..fb78119f3 100644
--- a/js/modules/signal.js
+++ b/js/modules/signal.js
@@ -50,7 +50,6 @@ const {
SettingsView,
} = require('../../ts/components/session/settings/SessionSettings');
const { SessionToast } = require('../../ts/components/session/SessionToast');
-const { SessionToggle } = require('../../ts/components/session/SessionToggle');
const { SessionModal } = require('../../ts/components/session/SessionModal');
const {
SessionSeedModal,
@@ -272,7 +271,6 @@ exports.setup = (options = {}) => {
GroupInvitation,
SessionConversation,
SessionToast,
- SessionToggle,
SessionConfirm,
SessionModal,
SessionSeedModal,
diff --git a/js/modules/types/attachment.js b/js/modules/types/attachment.js
index 26e91b16a..e43412066 100644
--- a/js/modules/types/attachment.js
+++ b/js/modules/types/attachment.js
@@ -215,6 +215,7 @@ exports.isVoiceMessage = AttachmentTS.isVoiceMessage;
exports.save = AttachmentTS.save;
exports.getFileExtension = AttachmentTS.getFileExtension;
exports.getSuggestedFilenameSending = AttachmentTS.getSuggestedFilenameSending;
+exports.arrayBufferFromFile = AttachmentTS.arrayBufferFromFile;
const THUMBNAIL_SIZE = 150;
const THUMBNAIL_CONTENT_TYPE = 'image/png';
diff --git a/js/views/conversation_loading_view.js b/js/views/conversation_loading_view.js
deleted file mode 100644
index 136de39cd..000000000
--- a/js/views/conversation_loading_view.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/* global Whisper */
-
-// eslint-disable-next-line func-names
-(function() {
- 'use strict';
-
- window.Whisper = window.Whisper || {};
-
- Whisper.ConversationLoadingScreen = Whisper.View.extend({
- initialize() {},
-
- render() {
- this.dialogView = new Whisper.ReactWrapperView({
- className: 'app-loading-wrapper',
- Component: window.Signal.Components.ConversationLoadingScreen,
- props: this.props,
- });
-
- this.$el.append(this.dialogView.el);
- },
- });
-})();
diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js
index 1ccf1a3f5..44eb16c08 100644
--- a/js/views/conversation_view.js
+++ b/js/views/conversation_view.js
@@ -210,37 +210,6 @@
// paste: 'onPaste',
},
- onChooseAttachment(e) {
- if (e) {
- e.stopPropagation();
- e.preventDefault();
- }
-
- this.$('input.file-input').click();
- },
- async onChoseAttachment() {
- const fileField = this.$('input.file-input');
- const files = fileField.prop('files');
-
- for (let i = 0, max = files.length; i < max; i += 1) {
- const file = files[i];
- // eslint-disable-next-line no-await-in-loop
- await this.fileInput.maybeAddAttachment(file);
- this.toggleMicrophone();
- }
-
- fileField.val(null);
- },
-
- onDragOver(e) {
- this.fileInput.onDragOver(e);
- },
- onDragLeave(e) {
- this.fileInput.onDragLeave(e);
- },
- onDrop(e) {
- this.fileInput.onDrop(e);
- },
onPaste(e) {
this.fileInput.onPaste(e);
},
@@ -258,13 +227,6 @@
}
},
- onDisableInput(disable) {
- this.$('button.microphone, button.paperclip, .send-message').attr(
- 'disabled',
- disable
- );
- },
-
onChangePlaceholder(type) {
if (!this.$messageField) {
return;
diff --git a/js/views/invite_contacts_dialog_view.js b/js/views/invite_contacts_dialog_view.js
index a79adc2dc..0a0b42d63 100644
--- a/js/views/invite_contacts_dialog_view.js
+++ b/js/views/invite_contacts_dialog_view.js
@@ -57,14 +57,21 @@
submit(pubkeys) {
// public group chats
if (this.isPublic) {
- window.sendGroupInvitations(
- {
- address: this.chatServer,
- name: this.chatName,
- channelId: this.channelId,
- },
- pubkeys
- );
+ const serverInfos = {
+ address: this.chatServer,
+ name: this.chatName,
+ channelId: this.channelId,
+ };
+ pubkeys.forEach(async pubkeyStr => {
+ const convo = await window.ConversationController.getOrCreateAndWait(
+ pubkeyStr,
+ 'private'
+ );
+
+ if (convo) {
+ convo.sendMessage('', null, null, null, serverInfos);
+ }
+ });
} else {
// private group chats
const ourPK = window.textsecure.storage.user.getNumber();
diff --git a/js/views/session_toggle_view.js b/js/views/session_toggle_view.js
deleted file mode 100644
index 8d0e35a46..000000000
--- a/js/views/session_toggle_view.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* global Whisper */
-
-// eslint-disable-next-line func-names
-(function() {
- 'use strict';
-
- window.Whisper = window.Whisper || {};
-
- Whisper.SessionToggleView = Whisper.View.extend({
- initialize(options) {
- this.props = {
- active: options.active,
- };
- },
-
- render() {
- this.toggleView = new Whisper.ReactWrapperView({
- className: 'session-toggle-wrapper',
- Component: window.Signal.Components.SessionToggle,
- props: this.props,
- });
-
- this.$el.append(this.toggleView.el);
- },
-
- toggle() {
- this.props.active = !this.props.active;
- this.toggleView.update(this.props);
- },
- });
-})();
diff --git a/test/index.html b/test/index.html
index 7565763c9..634941b8b 100644
--- a/test/index.html
+++ b/test/index.html
@@ -251,8 +251,6 @@
-
-