Skip to content

Commit

Permalink
Merge pull request #698 from nutgram/fix-mask-position-hydration
Browse files Browse the repository at this point in the history
Fix hydration mask position for stickers
  • Loading branch information
sergix44 committed Apr 30, 2024
2 parents 6c0ee00 + 1b165b6 commit c98a80b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Telegram/Types/Sticker/MaskPosition.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace SergiX44\Nutgram\Telegram\Types\Sticker;

use JsonSerializable;
use SergiX44\Hydrator\Annotation\SkipConstructor;
use SergiX44\Hydrator\Resolver\EnumOrScalar;
use SergiX44\Nutgram\Telegram\Properties\MaskPositionPoint;
use SergiX44\Nutgram\Telegram\Types\BaseType;
Expand All @@ -11,6 +12,7 @@
* This object describes the position on faces where a mask should be placed by default.
* @see https://core.telegram.org/bots/api#maskposition
*/
#[SkipConstructor]
class MaskPosition extends BaseType implements JsonSerializable
{
/**
Expand Down
8 changes: 7 additions & 1 deletion tests/Fixtures/Updates/sticker.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@
},
"file_id": "yhufjikjhgjkghjffghgf",
"file_unique_id": "fghgfhfgthf",
"file_size": 38662
"file_size": 38662,
"mask_position": {
"point": "forehead",
"x_shift": 0.5,
"y_shift": 0.5,
"scale": 1.5
}
}
}
}

0 comments on commit c98a80b

Please sign in to comment.