Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "Matrix Content Storage" #44

Merged
merged 3 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/Auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import EtherpadAuthProvider from './auth/EtherpadAuthProvider';
*/
const AuthProviders = {
matrix: MatrixAuthProvider,
matrixContentStorage: MatrixAuthProvider,
peerTube: PeerTubeAuthProvider,
etherpad: EtherpadAuthProvider,
};
Expand Down
525 changes: 262 additions & 263 deletions lib/Matrix.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions next.config.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@ module.exports = {
baseUrl: 'https://matrix.org',
allowCustomHomeserver: true,
},
matrixContentStorage: {
baseUrl: 'https://second.matrixserver.org',
},
etherpad: {
path: '/write',
baseUrl: 'https://pad.riseup.net/p',
myPads: {
api: 'http://etherpad.localhost/mypads/api',
spacesGroupName: '/spaces', // optional, defaults to publicRuntimeConfig.name

},
},
},
Expand Down
10 changes: 5 additions & 5 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ import Head from 'next/head';
import getConfig from 'next/config';
import { useRouter } from 'next/router';

import '../lib/Internationalization';

import { DefaultLayout } from '../components/layouts/default';
import { AuthContext, useAuthProvider } from '../lib/Auth';
import { MatrixContext, useMatrixProvider } from '../lib/Matrix';
import '../lib/Internationalization';

import '/assets/_globalCss.css';
import { DefaultLayout } from '../components/layouts/default';
import MatrixAuthProvider from '../lib/auth/MatrixAuthProvider';

const guestRoutes = ['/', '/login'];

export default function App({ Component, pageProps }) {
const router = useRouter();

const authData = useAuthProvider();
const matrixData = useMatrixProvider(authData.getActiveAuthenticationsByType(MatrixAuthProvider));
const matrixData = useMatrixProvider(authData);

let Layout = DefaultLayout;
if (Component.getLayout) { Layout = Component.getLayout(); }
Expand Down
4 changes: 1 addition & 3 deletions pages/chat/[[...roomId]].js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import getConfig from 'next/config';
import { useRouter } from 'next/router';
import Link from 'next/link';

import { useAuth } from '../../lib/Auth';
import { useMatrix } from '../../lib/Matrix';
import IframeLayout from '../../components/layouts/iframe';
import { breakpoints } from '../../components/_breakpoints';
Expand Down Expand Up @@ -75,12 +74,11 @@ const SidebarListEntry = function({ room }) {
};

export default function RoomId() {
const auth = useAuth();
const iframe = useRef();
const router = useRouter();
const roomId = _.get(router, 'query.roomId.0');
const { t } = useTranslation('chat');
const matrix = useMatrix(auth.getAuthenticationProvider('matrix'));
const matrix = useMatrix();

// Injecting custom CSS into the Element <iframe>
useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion pages/etherpad/[[...roomId]].js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import CreatePasswordPad from './actions/CreatePasswordPad';

export default function Etherpad() {
const auth = useAuth();
const matrix = useMatrix(auth.getAuthenticationProvider('matrix'));
const matrix = useMatrix();

const matrixClient = auth.getAuthenticationProvider('matrix').getMatrixClient();
const etherpad = auth.getAuthenticationProvider('etherpad');
Expand Down
2 changes: 0 additions & 2 deletions pages/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ export default function Login() {
const logAuthenticationStatus = () => {
console.log('matrix authentication provider status:');
console.log(auth.getAuthenticationProvider('matrix'));
console.log('matrixContentStorage authentication provider status:');
console.log(auth.getAuthenticationProvider('matrixContentStorage'));
console.log('peerTube authentication provider status:');
console.log(auth.getAuthenticationProvider('peerTube'));
};
Expand Down