Support alternate Discord hosts

This commit is contained in:
Cadence Ember 2023-10-16 00:12:00 +13:00
parent 9c3f1abd3a
commit 1d7ec4315e
3 changed files with 9 additions and 1 deletions

View File

@ -1,8 +1,12 @@
// @ts-check
const { SnowTransfer } = require("snowtransfer")
const registration = require("../matrix/read-registration")
const { Endpoints, SnowTransfer } = require("snowtransfer")
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 { sync } = passthrough

View File

@ -18,6 +18,8 @@ ooye:
max_file_size: 5000000
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]
discord_origin: https://discord.com
discord_cdn_origin: https://cdn.discordapp.com
invite:
# uncomment this to auto-invite the named user to newly created spaces and mark them as admin (PL 100) everywhere
# - @cadence:cadence.moe

2
types.d.ts vendored
View File

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