Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

fix(app): treat official invite and gift links as external when self-hosted (#1650)

Hampus5f9e4db2301c
diff --git a/fluxer_app/src/features/gift/utils/GiftCodeUtils.ts b/fluxer_app/src/features/gift/utils/GiftCodeUtils.ts
index a6a22294d..f11a4443e 100644
--- a/fluxer_app/src/features/gift/utils/GiftCodeUtils.ts
+++ b/fluxer_app/src/features/gift/utils/GiftCodeUtils.ts
@@ -14,6 +14,9 @@ const OFFICIAL_GIFT_URL_BASES = Object.freeze([
const GIFT_CONFIG: CodeLinkUtils.CodeLinkConfig = {
path: 'gift',
get urlBases() {
+ if (RuntimeConfig.isSelfHosted()) {
+ return [RuntimeConfig.giftUrlBase];
+ }
return [RuntimeConfig.giftUrlBase, ...OFFICIAL_GIFT_URL_BASES];
},
};
diff --git a/fluxer_app/src/features/invite/utils/InviteUtils.ts b/fluxer_app/src/features/invite/utils/InviteUtils.ts
index 572e88b07..d58f79c4b 100644
--- a/fluxer_app/src/features/invite/utils/InviteUtils.ts
+++ b/fluxer_app/src/features/invite/utils/InviteUtils.ts
@@ -22,6 +22,9 @@ const OFFICIAL_INVITE_URL_BASES = Object.freeze([
const INVITE_CONFIG: CodeLinkUtils.CodeLinkConfig = {
path: 'invite',
get urlBases() {
+ if (RuntimeConfig.isSelfHosted()) {
+ return [RuntimeConfig.inviteUrlBase];
+ }
return [RuntimeConfig.inviteUrlBase, ...OFFICIAL_INVITE_URL_BASES];
},
};