Support alternate Discord hosts
This commit is contained in:
@@ -1,10 +1,14 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
const { SnowTransfer } = require("snowtransfer")
|
const {Endpoints, SnowTransfer} = require("snowtransfer")
|
||||||
const { Client: CloudStorm } = require("cloudstorm")
|
const {reg} = require("../matrix/read-registration")
|
||||||
|
const {Client: CloudStorm} = require("cloudstorm")
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
Endpoints.BASE_HOST = reg.ooye.discord_origin || "https://discord.com"; Endpoints.CDN_URL = reg.ooye.discord_cdn_origin || "https://cdn.discordapp.com"
|
||||||
|
|
||||||
const passthrough = require("../passthrough")
|
const passthrough = require("../passthrough")
|
||||||
const { sync } = passthrough
|
const {sync} = passthrough
|
||||||
|
|
||||||
/** @type {import("./discord-packets")} */
|
/** @type {import("./discord-packets")} */
|
||||||
const discordPackets = sync.require("./discord-packets")
|
const discordPackets = sync.require("./discord-packets")
|
||||||
|
2
src/types.d.ts
vendored
2
src/types.d.ts
vendored
@@ -28,6 +28,8 @@ export type AppServiceRegistrationConfig = {
|
|||||||
content_length_workaround: boolean
|
content_length_workaround: boolean
|
||||||
include_user_id_in_mxid: boolean
|
include_user_id_in_mxid: boolean
|
||||||
invite: string[]
|
invite: string[]
|
||||||
|
discord_origin?: string
|
||||||
|
discord_cdn_origin?: string
|
||||||
}
|
}
|
||||||
old_bridge?: {
|
old_bridge?: {
|
||||||
as_token: string
|
as_token: string
|
||||||
|
Reference in New Issue
Block a user