diff --git a/fluxer_api/src/api/channel/controllers/ThreadController.ts b/fluxer_api/src/api/channel/controllers/ThreadController.ts index 3374151e9..5bc7e4cef 100644 --- a/fluxer_api/src/api/channel/controllers/ThreadController.ts +++ b/fluxer_api/src/api/channel/controllers/ThreadController.ts @@ -33,7 +33,6 @@ import { StartThreadFromMessageRequest, StartThreadRequest, ThreadChannelResponse, - ThreadLocationQuery, ThreadMemberGetQuery, ThreadMemberListResponse, ThreadMembersListQuery, @@ -389,7 +388,6 @@ export function ThreadController(app: HonoApp) { RateLimitMiddleware(RateLimitConfigs.CHANNEL_THREAD_MEMBER_PUT), LoginRequired, Validator('param', ChannelIdParam), - Validator('query', ThreadLocationQuery), OpenAPI({ operationId: 'join_thread', summary: 'Join a thread', @@ -415,7 +413,6 @@ export function ThreadController(app: HonoApp) { RateLimitMiddleware(RateLimitConfigs.CHANNEL_THREAD_MEMBER_DELETE), LoginRequired, Validator('param', ChannelIdParam), - Validator('query', ThreadLocationQuery), OpenAPI({ operationId: 'leave_thread', summary: 'Leave a thread', @@ -474,7 +471,6 @@ export function ThreadController(app: HonoApp) { LoginRequired, SelfThreadMemberAlias('join'), Validator('param', ChannelIdUserIdParam), - Validator('query', ThreadLocationQuery), OpenAPI({ operationId: 'add_thread_member', summary: 'Add a thread member', @@ -504,7 +500,6 @@ export function ThreadController(app: HonoApp) { LoginRequired, SelfThreadMemberAlias('leave'), Validator('param', ChannelIdUserIdParam), - Validator('query', ThreadLocationQuery), OpenAPI({ operationId: 'remove_thread_member', summary: 'Remove a thread member', diff --git a/fluxer_api/src/api/openapi/openapi.json b/fluxer_api/src/api/openapi/openapi.json index 0d219a64d..7b77c52f3 100644 --- a/fluxer_api/src/api/openapi/openapi.json +++ b/fluxer_api/src/api/openapi/openapi.json @@ -5850,13 +5850,6 @@ "required": true, "schema": {"description": "The ID of the channel", "$ref": "#/components/schemas/SnowflakeType"}, "description": "The ID of the channel" - }, - { - "name": "location", - "in": "query", - "required": false, - "schema": {"description": "Accepted and ignored", "type": "string", "maxLength": 100}, - "description": "Accepted and ignored" } ] }, @@ -5915,13 +5908,6 @@ "required": true, "schema": {"description": "The ID of the channel", "$ref": "#/components/schemas/SnowflakeType"}, "description": "The ID of the channel" - }, - { - "name": "location", - "in": "query", - "required": false, - "schema": {"description": "Accepted and ignored", "type": "string", "maxLength": 100}, - "description": "Accepted and ignored" } ] } @@ -6140,13 +6126,6 @@ "required": true, "schema": {"description": "The ID of the user", "$ref": "#/components/schemas/SnowflakeType"}, "description": "The ID of the user" - }, - { - "name": "location", - "in": "query", - "required": false, - "schema": {"description": "Accepted and ignored", "type": "string", "maxLength": 100}, - "description": "Accepted and ignored" } ] }, @@ -6212,13 +6191,6 @@ "required": true, "schema": {"description": "The ID of the user", "$ref": "#/components/schemas/SnowflakeType"}, "description": "The ID of the user" - }, - { - "name": "location", - "in": "query", - "required": false, - "schema": {"description": "Accepted and ignored", "type": "string", "maxLength": 100}, - "description": "Accepted and ignored" } ] } @@ -31490,8 +31462,7 @@ "maximum": 21600, "description": "Seconds a user has to wait before sending another message (0-21600)", "$ref": "#/components/schemas/Int32Type" - }, - "location": {"description": "Accepted and ignored", "type": "string", "maxLength": 100} + } }, "required": ["name"] }, @@ -36252,8 +36223,7 @@ }, "description": "The first message of the post", "$ref": "#/components/schemas/ForumThreadMessageRequest" - }, - "location": {"description": "Accepted and ignored", "type": "string", "maxLength": 100} + } }, "required": ["name", "message"], "x-fluxer-experiment": "channel_threads" @@ -36272,8 +36242,7 @@ "invitable": { "description": "Whether non-moderators can add other non-moderators (private threads)", "type": "boolean" - }, - "location": {"description": "Accepted and ignored", "type": "string", "maxLength": 100} + } }, "required": ["name", "type"] }, diff --git a/fluxer_docs/src/content/docs/http-api/thread-members.mdx b/fluxer_docs/src/content/docs/http-api/thread-members.mdx index 61c22702c..44af2915d 100644 --- a/fluxer_docs/src/content/docs/http-api/thread-members.mdx +++ b/fluxer_docs/src/content/docs/http-api/thread-members.mdx @@ -84,12 +84,6 @@ Joining a locked thread needs an enrolled authenticator while the guild [MFA lev | --- | --- | --- | | channel_id | snowflake | The ID of the thread | -### Query parameters - -| Field | Type | Description | -| --- | --- | --- | -| location? | string | A value Fluxer accepts and ignores (max 100 characters) | - ### Response | Status | Body | Condition | @@ -131,12 +125,6 @@ Adding to a locked thread needs an enrolled authenticator while the guild [MFA l | channel_id | snowflake | The ID of the thread | | user_id | snowflake | The ID of the user to add | -### Query parameters - -| Field | Type | Description | -| --- | --- | --- | -| location? | string | A value Fluxer accepts and ignores (max 100 characters) | - ### Response | Status | Body | Condition | @@ -176,12 +164,6 @@ A timed-out member can leave a thread. A member who can no longer view the threa | --- | --- | --- | | channel_id | snowflake | The ID of the thread | -### Query parameters - -| Field | Type | Description | -| --- | --- | --- | -| location? | string | A value Fluxer accepts and ignores (max 100 characters) | - ### Response | Status | Body | Condition | @@ -219,12 +201,6 @@ Removing a member needs an enrolled authenticator while the guild [MFA level](/h | channel_id | snowflake | The ID of the thread | | user_id | snowflake | The ID of the user to remove | -### Query parameters - -| Field | Type | Description | -| --- | --- | --- | -| location? | string | A value Fluxer accepts and ignores (max 100 characters) | - ### Response | Status | Body | Condition | diff --git a/fluxer_docs/src/content/docs/http-api/threads.mdx b/fluxer_docs/src/content/docs/http-api/threads.mdx index 4d711d0ae..80843414f 100644 --- a/fluxer_docs/src/content/docs/http-api/threads.mdx +++ b/fluxer_docs/src/content/docs/http-api/threads.mdx @@ -184,7 +184,6 @@ Starts a public thread from a message in a guild text channel, or an announcemen | name | string | The name of the thread (1-100 characters) | | auto_archive_duration? | integer | The [auto archive duration](#auto-archive-durations) in minutes (default 4320) | | rate_limit_per_user? | integer | The slowmode interval in seconds (0-21,600) | -| location? | string | A value Fluxer accepts and ignores (max 100 characters) | `rate_limit_per_user` defaults to the `default_thread_rate_limit_per_user` of the parent, or `0` when the parent has none. @@ -252,7 +251,6 @@ The parent type selects the body. Either body can be sent as multipart form data | auto_archive_duration? | integer | The [auto archive duration](#auto-archive-durations) in minutes (default 4320) | | rate_limit_per_user? | integer | The slowmode interval in seconds (0-21,600) | | invitable?1 | boolean | Whether a member who is not a thread moderator can add members who are not thread moderators (default true) | -| location? | string | A value Fluxer accepts and ignores (max 100 characters) | 1 Applies only to a private thread @@ -266,7 +264,6 @@ The parent type selects the body. Either body can be sent as multipart form data | auto_archive_duration? | integer | The [auto archive duration](#auto-archive-durations) in minutes (default 4320) | | rate_limit_per_user? | integer | The slowmode interval in seconds (0-21,600) | | type?2 | integer | The thread type (`11` only) | -| location? | string | A value Fluxer accepts and ignores (max 100 characters) | 1 Required when the channel has `REQUIRE_TAG`. A tag marked `moderated` needs a thread moderator diff --git a/packages/schema/src/domains/channel/ForumRequestSchemas.ts b/packages/schema/src/domains/channel/ForumRequestSchemas.ts index 98e197e59..cc9f5c3b7 100644 --- a/packages/schema/src/domains/channel/ForumRequestSchemas.ts +++ b/packages/schema/src/domains/channel/ForumRequestSchemas.ts @@ -38,7 +38,6 @@ import {z} from 'zod'; const EXPERIMENT = {experiment: 'channel_threads'} as const; const EMOJI_NAME_MAX_LENGTH = 64; -const LOCATION_MAX_LENGTH = 100; export const ForumTagRequest = withSchemaMetadata( z.object({ @@ -141,7 +140,6 @@ export const StartForumThreadRequest = withSchemaMetadata( .describe('Seconds a user has to wait before sending another message (0-21600)'), applied_tags: AppliedTagsType.optional(), message: ForumThreadMessageRequest.describe('The first message of the post'), - location: z.string().max(LOCATION_MAX_LENGTH).optional().describe('Accepted and ignored'), }), EXPERIMENT, ); diff --git a/packages/schema/src/domains/channel/ThreadRequestSchemas.ts b/packages/schema/src/domains/channel/ThreadRequestSchemas.ts index 4eff91c7f..690047596 100644 --- a/packages/schema/src/domains/channel/ThreadRequestSchemas.ts +++ b/packages/schema/src/domains/channel/ThreadRequestSchemas.ts @@ -22,7 +22,6 @@ import { import {z} from 'zod'; const THREAD_MEMBERS_LIST_MAX_LIMIT = 100; -const LOCATION_MAX_LENGTH = 100; export const ThreadAutoArchiveDurationSchema = createInt32EnumType( [ @@ -43,13 +42,10 @@ const ThreadRateLimitPerUserType = Int32Type.max(THREAD_RATE_LIMIT_PER_USER_MAX) 'Seconds a user has to wait before sending another message (0-21600)', ); -const LocationType = z.string().max(LOCATION_MAX_LENGTH).optional().describe('Accepted and ignored'); - export const StartThreadFromMessageRequest = z.object({ name: ThreadNameType, auto_archive_duration: ThreadAutoArchiveDurationSchema.optional(), rate_limit_per_user: ThreadRateLimitPerUserType.optional(), - location: LocationType, }); export type StartThreadFromMessageRequest = z.infer; @@ -68,15 +64,10 @@ export const StartThreadRequest = z.object({ auto_archive_duration: ThreadAutoArchiveDurationSchema.optional(), rate_limit_per_user: ThreadRateLimitPerUserType.optional(), invitable: z.boolean().optional().describe('Whether non-moderators can add other non-moderators (private threads)'), - location: LocationType, }); export type StartThreadRequest = z.infer; -export const ThreadLocationQuery = z.object({ - location: LocationType, -}); - export const ThreadMembersListQuery = z.object({ with_member: QueryBooleanType.describe('Whether to include a guild member object for each thread member'), after: SnowflakeType.optional().describe('Get thread members after this user ID'),