Default homeserver is chat.gamecult.org #90
3 changed files with 7 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"defaultHomeserver": 0,
|
||||
"homeserverList": [
|
||||
"chat.gamecult.org",
|
||||
"gamecult.org",
|
||||
"converser.eu",
|
||||
"matrix.org",
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import { ClientConfig, clientDefaultServer } from './useClientConfig';
|
|||
import config from '../../../config.json';
|
||||
|
||||
describe('default homeserver', () => {
|
||||
it('is gamecult.org when the config names none', () => {
|
||||
expect(clientDefaultServer({})).toBe('gamecult.org');
|
||||
expect(clientDefaultServer({ homeserverList: [] })).toBe('gamecult.org');
|
||||
it('is chat.gamecult.org when the config names none', () => {
|
||||
expect(clientDefaultServer({})).toBe('chat.gamecult.org');
|
||||
expect(clientDefaultServer({ homeserverList: [] })).toBe('chat.gamecult.org');
|
||||
});
|
||||
|
||||
it('is the listed server the config points at', () => {
|
||||
|
|
@ -14,7 +14,7 @@ describe('default homeserver', () => {
|
|||
).toBe('chat.gamecult.org');
|
||||
});
|
||||
|
||||
it('is gamecult.org in the repo config.json too', () => {
|
||||
expect(clientDefaultServer(config as ClientConfig)).toBe('gamecult.org');
|
||||
it('is chat.gamecult.org in the repo config.json too', () => {
|
||||
expect(clientDefaultServer(config as ClientConfig)).toBe('chat.gamecult.org');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ export function useClientConfig(): ClientConfig {
|
|||
}
|
||||
|
||||
export const clientDefaultServer = (clientConfig: ClientConfig): string =>
|
||||
clientConfig.homeserverList?.[clientConfig.defaultHomeserver ?? 0] ?? 'gamecult.org';
|
||||
clientConfig.homeserverList?.[clientConfig.defaultHomeserver ?? 0] ?? 'chat.gamecult.org';
|
||||
|
||||
export const clientAllowedServer = (clientConfig: ClientConfig, server: string): boolean => {
|
||||
const { homeserverList, allowCustomHomeservers } = clientConfig;
|
||||
|
|
|
|||
Loading…
Reference in a new issue