mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(app): gate reworked typing indicators behind an experiment (#2782)
This commit is contained in:
1 parent
1861432a53
commit
c212d315f4
91 files changed
+6137
-1756
No files matched your search
@@ -28,6 +28,10 @@ import {
|
||||
INERT_MESSAGE_KEYBOARD_FOCUS_ASSIGNMENT,
|
||||
MessageKeyboardFocusAssignmentResponse,
|
||||
} from '@fluxer/schema/src/domains/experiment/MessageKeyboardFocusSchemas';
|
||||
import {
|
||||
INERT_TYPING_INDICATOR_REWORK_ASSIGNMENT,
|
||||
TypingIndicatorReworkAssignmentResponse,
|
||||
} from '@fluxer/schema/src/domains/experiment/TypingIndicatorReworkSchemas';
|
||||
import {z} from 'zod';
|
||||
|
||||
export const EXPERIMENT_MIN_POLL_INTERVAL_SECONDS = 60;
|
||||
@@ -72,6 +76,7 @@ const ExperimentAssignmentsSchema = z.object({
|
||||
guild_activity_log_presentation: GuildActivityLogPresentationAssignmentResponse.optional(),
|
||||
expression_info_card: ExpressionInfoCardAssignmentResponse.optional(),
|
||||
guild_header_collapse: GuildHeaderCollapseAssignmentResponse.optional(),
|
||||
typing_indicator_rework: TypingIndicatorReworkAssignmentResponse.optional(),
|
||||
});
|
||||
|
||||
export const ExperimentAssignmentsResponse = z.object({
|
||||
@@ -129,3 +134,9 @@ export function readGuildHeaderCollapseAssignment(
|
||||
): GuildHeaderCollapseAssignmentResponse {
|
||||
return response.assignments.guild_header_collapse ?? INERT_GUILD_HEADER_COLLAPSE_ASSIGNMENT;
|
||||
}
|
||||
|
||||
export function readTypingIndicatorReworkAssignment(
|
||||
response: ExperimentAssignmentsResponse,
|
||||
): TypingIndicatorReworkAssignmentResponse {
|
||||
return response.assignments.typing_indicator_rework ?? INERT_TYPING_INDICATOR_REWORK_ASSIGNMENT;
|
||||
}
|
||||
Reference in new issue
Block a user