Skip to content

Commit

Permalink
Feature / Telegram Sticker domains
Browse files Browse the repository at this point in the history
- Fix AssociativeArray proxy for stickers
  • Loading branch information
glavvra4 committed Dec 16, 2023
1 parent 646b8f1 commit 2b21eb7
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions core/Telegram/Sticker/Proxy/Sticker/AssociativeArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,30 @@ public function __construct(
new File\Dimension($data['height']),
new Sticker\IsAnimated($data['is_animated']),
new Sticker\IsVideo($data['is_video']),
new PhotoSizeAssociativeArrayProxy($data['thumbnail']),
new Sticker\Emoji($data['emoji']),
new StickerSet\Name($data['set_name']),
new FileAssociativeArrayProxy($data['premium_animation']),
new MaskPositionAssociativeArrayProxy($data['mask_position']),
new Sticker\CustomEmojiId($data['custom_emoji_id']),
new Sticker\NeedsRepainting($data['needs_repainting']),
new File\Size($data['file_size'])
isset($data['thumbnail'])
? new PhotoSizeAssociativeArrayProxy($data['thumbnail'])
: null,
isset($data['emoji'])
? new Sticker\Emoji($data['emoji'])
: null,
isset($data['set_name'])
? new StickerSet\Name($data['set_name'])
: null,
isset($data['premium_animation'])
? new FileAssociativeArrayProxy($data['premium_animation'])
: null,
isset($data['mask_position'])
? new MaskPositionAssociativeArrayProxy($data['mask_position'])
: null,
isset($data['custom_emoji_id'])
? new Sticker\CustomEmojiId($data['custom_emoji_id'])
: null,
isset($data['needs_repainting'])
? new Sticker\NeedsRepainting($data['needs_repainting'])
: null,
isset($data['file_size'])
? new File\Size($data['file_size'])
: null
);
}
}

0 comments on commit 2b21eb7

Please sign in to comment.