Compare commits

...

1 commit

Author SHA1 Message Date
1d7ec4315e Support alternate Discord hosts 2023-10-16 00:12:00 +13:00
3 changed files with 9 additions and 1 deletions

View file

@ -1,8 +1,12 @@
// @ts-check // @ts-check
const { SnowTransfer } = require("snowtransfer") const registration = require("../matrix/read-registration")
const { Endpoints, SnowTransfer } = require("snowtransfer")
const { Client: CloudStorm } = require("cloudstorm") const { Client: CloudStorm } = require("cloudstorm")
// @ts-ignore
Endpoints.BASE_HOST = registration.ooye.discord_origin; Endpoints.CDN_URL = registration.ooye.discord_cdn_origin
const passthrough = require("../passthrough") const passthrough = require("../passthrough")
const { sync } = passthrough const { sync } = passthrough

View file

@ -18,6 +18,8 @@ ooye:
max_file_size: 5000000 max_file_size: 5000000
server_name: [the part after the colon in your matrix id, like cadence.moe] server_name: [the part after the colon in your matrix id, like cadence.moe]
server_origin: [the full protocol and domain of your actual matrix server's location, with no trailing slash, like https://matrix.cadence.moe] server_origin: [the full protocol and domain of your actual matrix server's location, with no trailing slash, like https://matrix.cadence.moe]
discord_origin: https://discord.com
discord_cdn_origin: https://cdn.discordapp.com
invite: invite:
# uncomment this to auto-invite the named user to newly created spaces and mark them as admin (PL 100) everywhere # uncomment this to auto-invite the named user to newly created spaces and mark them as admin (PL 100) everywhere
# - @cadence:cadence.moe # - @cadence:cadence.moe

2
types.d.ts vendored
View file

@ -21,6 +21,8 @@ export type AppServiceRegistrationConfig = {
max_file_size: number max_file_size: number
server_name: string server_name: string
server_origin: string server_origin: string
discord_origin: string
discord_cdn_origin: string
invite: string[] invite: string[]
} }
old_bridge?: { old_bridge?: {