feat(app): show paused-messaging banner across the app (#3178)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-03 19:31:43 +02:00
1 parent 973aaced96
commit bc5dcdfe21
61 files changed
+7917 -7775

No files matched your search

@@ -23,6 +23,7 @@ import {MenuItem} from '@app/features/ui/action_menu/MenuItem';
import {MenuItemSubmenu} from '@app/features/ui/action_menu/MenuItemSubmenu';
import * as ToastCommands from '@app/features/ui/commands/ToastCommands';
import type {User} from '@app/features/user/models/User';
import {blockIfAccountLimited} from '@app/features/user/utils/AccountLimitUtils';
import type {Invite} from '@fluxer/schema/src/domains/invite/InviteSchemas';
import {fromTimestamp} from '@fluxer/snowflake/src/SnowflakeUtils';
import {useLingui} from '@lingui/react/macro';
@@ -63,6 +64,7 @@ export const InviteToCommunityMenuItem: React.FC<InviteToCommunityMenuItemProps>
const handleSendInvite = useCallback(
async (candidate: InviteCandidate) => {
if (sendingRef.current) return;
if (blockIfAccountLimited()) return;
const guardKey = getInviteToCommunityGuardKey(user.id, candidate.guild.id, candidate.channelId);
if (!beginInviteToCommunityGuard(guardKey)) return;
sendingRef.current = true;
@@ -81,8 +83,8 @@ export const InviteToCommunityMenuItem: React.FC<InviteToCommunityMenuItemProps>
}
inviteUrl = `${RuntimeConfig.inviteEndpoint}/${invite.code}`;
}
const dmChannelId = await PrivateChannelCommands.ensureDMChannel(user.id);
try {
const dmChannelId = await PrivateChannelCommands.ensureDMChannel(user.id);
const result = await MessageCommands.send(dmChannelId, {
content: inviteUrl,
nonce: fromTimestamp(Date.now()),
@@ -24,6 +24,7 @@ export interface NagbarSettings {
claimAccountModalShownThisSession: boolean;
forceConnectionNotice: boolean;
forceEmailVerification: boolean;
forceAccountLimited: boolean;
forceIOSInstall: boolean;
forcePWAInstall: boolean;
forcePushNotification: boolean;
@@ -45,6 +46,7 @@ export interface NagbarSettings {
forceDomainMoved: boolean;
forceHideConnectionNotice: boolean;
forceHideEmailVerification: boolean;
forceHideAccountLimited: boolean;
forceHideIOSInstall: boolean;
forceHidePWAInstall: boolean;
forceHidePushNotification: boolean;
@@ -98,6 +100,7 @@ export class Nagbar implements NagbarSettings {
claimAccountModalShownThisSession = false;
forceOffline = false;
forceEmailVerification = false;
forceAccountLimited = false;
forceIOSInstall = false;
forcePWAInstall = false;
forcePushNotification = false;
@@ -120,6 +123,7 @@ export class Nagbar implements NagbarSettings {
forceConnectionNotice = false;
forceHideOffline = false;
forceHideEmailVerification = false;
forceHideAccountLimited = false;
forceHideIOSInstall = false;
forceHidePWAInstall = false;
forceHidePushNotification = false;
@@ -416,6 +420,7 @@ export class Nagbar implements NagbarSettings {
this.claimAccountModalShownThisSession = false;
this.forceOffline = false;
this.forceEmailVerification = false;
this.forceAccountLimited = false;
this.forceIOSInstall = false;
this.forcePWAInstall = false;
this.forcePushNotification = false;
@@ -438,6 +443,7 @@ export class Nagbar implements NagbarSettings {
this.forceConnectionNotice = false;
this.forceHideOffline = false;
this.forceHideEmailVerification = false;
this.forceHideAccountLimited = false;
this.forceHideIOSInstall = false;
this.forceHidePWAInstall = false;
this.forceHidePushNotification = false;