summary refs log tree commit diff
diff options
context:
space:
mode:
authorCyber <cyber.hf18@gmail.com>2025-11-08 15:25:08 +0100
committerGitHub <noreply@github.com>2025-11-08 15:25:08 +0100
commita8d97359741b29947171eaaae0cf7b715792d3cc (patch)
tree11c038c955ee2584e48d729acd55f17701857646
parentMerge pull request #1372 from MathMan05/fixes (diff)
parentfix: gif stickers should have `format_type` 4 instead of 0 (diff)
downloadserver-ts-a8d97359741b29947171eaaae0cf7b715792d3cc.tar.xz
Merge pull request #1376 from CyberL1/fix/gif-stickers
-rw-r--r--src/schemas/api/guilds/Sticker.ts2
-rw-r--r--src/util/migration/postgres/1762611552514-fix-gif-stickers-format_type.ts11
2 files changed, 12 insertions, 1 deletions
diff --git a/src/schemas/api/guilds/Sticker.ts b/src/schemas/api/guilds/Sticker.ts

index 89b11ccf..b02e1e21 100644 --- a/src/schemas/api/guilds/Sticker.ts +++ b/src/schemas/api/guilds/Sticker.ts
@@ -4,8 +4,8 @@ export enum StickerType { } export enum StickerFormatType { - GIF = 0, // gif is a custom format type and not in discord spec PNG = 1, APNG = 2, LOTTIE = 3, + GIF = 4, } diff --git a/src/util/migration/postgres/1762611552514-fix-gif-stickers-format_type.ts b/src/util/migration/postgres/1762611552514-fix-gif-stickers-format_type.ts new file mode 100644
index 00000000..47de7506 --- /dev/null +++ b/src/util/migration/postgres/1762611552514-fix-gif-stickers-format_type.ts
@@ -0,0 +1,11 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class FixGifStickersFormatType1762611552514 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`UPDATE "stickers" SET "format_type" = 4 WHERE "format_type" = 0;`); + } + + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`UPDATE "stickers" SET "format_type" = 0 WHERE "format_type" = 4;`); + } +}