From bff5cd4d14ab6c869eaf8642398ed09e8aa6e033 Mon Sep 17 00:00:00 2001 From: lepLinus Date: Thu, 6 Oct 2022 14:12:28 +0200 Subject: [PATCH 1/5] Isolate chat --- iris-lib/src/Channel.js | 1 + package.json | 6 ++-- src/js/Main.tsx | 43 ++----------------------- src/js/components/Message.js | 4 --- src/js/views/Message.js | 32 ------------------ src/js/views/Notifications.js | 2 -- src/js/views/Profile.js | 31 +----------------- src/js/views/Torrent.js | 20 ------------ src/js/views/chat/ChatMessageForm.js | 5 --- src/js/views/chat/HashtagChat.js | 5 +-- src/js/views/settings/WebRTCSettings.js | 30 +++-------------- yarn.lock | 7 +--- 12 files changed, 15 insertions(+), 171 deletions(-) delete mode 100644 src/js/views/Message.js delete mode 100644 src/js/views/Torrent.js diff --git a/iris-lib/src/Channel.js b/iris-lib/src/Channel.js index 9641e9c49..9cc63bf6c 100644 --- a/iris-lib/src/Channel.js +++ b/iris-lib/src/Channel.js @@ -754,6 +754,7 @@ class Channel { if (subscription) { subscription.event = e; } if (!this.hasWritePermission(pub)) { return; } const decrypted = await Gun.SEA.decrypt(data, (await this.getTheirGroupSecret(pub))); + return; if (decrypted) { callback(typeof decrypted.v !== `undefined` ? decrypted.v : decrypted, key, pub); } diff --git a/package.json b/package.json index 956fec8cd..fc0d29723 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iris-messenger", - "version": "2.3.3", + "version": "2.3.3.1", "license": "MIT", "scripts": { "build": "preact build --no-prerender", @@ -58,7 +58,7 @@ "history": "5.3.0", "htm": "^3.1.1", "identicon.js": "^2.3.3", - "iris-lib": "file:./iris-lib", + "iris-lib": "./iris-lib", "jquery": "^3.6.1", "jsxstyle": "^2.5.1", "localforage": "^1.10.0", @@ -85,4 +85,4 @@ "resolutions": { "styled-components": "^5" } -} \ No newline at end of file +} diff --git a/src/js/Main.tsx b/src/js/Main.tsx index 1e41f7c48..9792a15e7 100644 --- a/src/js/Main.tsx +++ b/src/js/Main.tsx @@ -1,6 +1,6 @@ import Component from './BaseComponent'; import { Router, RouterOnChangeArgs, CustomHistory } from 'preact-router'; -import AsyncRoute from 'preact-async-route'; + import { createHashHistory } from 'history'; import {Helmet} from "react-helmet"; import { translationLoaded } from "./translations/Translation"; @@ -18,13 +18,11 @@ import Profile from './views/Profile'; import Group from './views/Group'; import Message from './views/Message'; import Follows from './views/Follows'; -import Feed from './views/Feed'; + import About from './views/About'; import Contacts from './views/Contacts'; import Torrent from './views/Torrent'; -import Menu from './components/Menu'; -import VideoCall from './components/VideoCall'; import MediaPlayer from './components/MediaPlayer'; import Footer from './components/Footer'; @@ -123,7 +121,6 @@ class Main extends Component { ) : null}
- {title} @@ -137,19 +134,13 @@ class Main extends Component {
this.onClickOverlay()}>
this.handleRoute(e)}> - - - - - - - + @@ -160,41 +151,13 @@ class Main extends Component { {/* Lazy load stuff that is used less often */} - import('./views/Store').then(module => module.default)} - /> - import('./views/Checkout').then(module => module.default)} - /> - import('./views/Product').then(module => module.default)} - /> - import('./views/Product').then(module => module.default)} - /> - import('./views/Explorer').then(module => module.default)} - /> - import('./views/Explorer').then(module => module.default)} - />
-