Skip to content

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

TypeScript fluxerfluxerapp

fix(app): use plain lifetime gift wording on self-hosted

Hampus791fc853f82f
diff --git a/fluxer_app/src/features/gift/utils/GiftUtils.ts b/fluxer_app/src/features/gift/utils/GiftUtils.ts
index 5119423ff..35e637d20 100644
--- a/fluxer_app/src/features/gift/utils/GiftUtils.ts
+++ b/fluxer_app/src/features/gift/utils/GiftUtils.ts
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
+import RuntimeConfig from '@app/features/app/state/RuntimeConfig';
import type {Gift, GiftDurationType} from '@app/features/gift/commands/GiftCommands';
import {getPremiumProductName} from '@app/features/premium/utils/PremiumUtils';
import type {I18n} from '@lingui/core';
@@ -77,7 +78,9 @@ function formatGiftDurationText(
function getPlutoniumDurationConfig(i18n: I18n): GiftDurationTextConfig {
return {
- lifetime: i18n._(VISIONARY_LIFETIME_DESCRIPTOR, {premiumProductName: getPremiumProductName()}),
+ lifetime: i18n._(RuntimeConfig.isSelfHosted() ? LIFETIME_DESCRIPTOR : VISIONARY_LIFETIME_DESCRIPTOR, {
+ premiumProductName: getPremiumProductName(),
+ }),
days: (durationQuantity: number) =>
i18n._(OTHER_OF_DESCRIPTOR, {durationQuantity, premiumProductName: getPremiumProductName()}),
weeks: (durationQuantity: number) =>