From e4a87559bf23b7eb7814838b5f5a4ed4f7403a7f Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 1 May 2024 14:44:19 +0200 Subject: [PATCH] Bump layer --- README.md | 1 + docs | 2 +- schemas | 2 +- src/MTProtoTools/Files.php | 3 +++ src/Namespace/Messages.php | 16 +++++++++++++--- src/Namespace/Stats.php | 2 +- src/TL_telegram_v179.tl | 7 ++++++- 7 files changed, 26 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index de89ec3d3..b5bb5a79f 100644 --- a/README.md +++ b/README.md @@ -1056,6 +1056,7 @@ Want to add your own open-source project to this list? [Click here!](https://doc * messages.deleteQuickReplyShortcut * messages.editQuickReplyShortcut * messages.getDefaultTagReactions + * messages.getEmojiStickerGroups * messages.getMyStickers * messages.getOutboxReadDate * messages.getQuickReplies diff --git a/docs b/docs index ab4b4782f..c147610cc 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit ab4b4782f8582ca413bcd7c94eb4900c828fd970 +Subproject commit c147610cc85c17b498283ba4974622b23696625d diff --git a/schemas b/schemas index ce6c26483..6fc533efe 160000 --- a/schemas +++ b/schemas @@ -1 +1 @@ -Subproject commit ce6c264833ab1496f2cef6489aa646f8fc191f76 +Subproject commit 6fc533efe6e1ce440f6da4b0d7037460f73ce96b diff --git a/src/MTProtoTools/Files.php b/src/MTProtoTools/Files.php index 3a1eb5b7e..d418eb68d 100644 --- a/src/MTProtoTools/Files.php +++ b/src/MTProtoTools/Files.php @@ -663,6 +663,9 @@ trait Files */ public function getPropicInfo($data): ?Photo { + if (!$this->getSettings()->getDb()->getEnableFullPeerDb()) { + throw new AssertionError("getPropicInfo cannot be used if the full peer database is disabled!"); + } return $this->getPwrChat($data, false)['photo'] ?? null; } /** diff --git a/src/Namespace/Messages.php b/src/Namespace/Messages.php index 4488e2fb1..0be1aad52 100644 --- a/src/Namespace/Messages.php +++ b/src/Namespace/Messages.php @@ -2300,7 +2300,7 @@ interface Messages * @param ?int $floodWaitLimit Can be used to specify a custom flood wait limit: if a FLOOD_WAIT_ rate limiting error is received with a waiting period bigger than this integer, an RPCErrorException will be thrown; otherwise, MadelineProto will simply wait for the specified amount of time. Defaults to the value specified in the settings: https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/RPC.html#setfloodtimeout-int-floodtimeout-self * @param ?string $queueId If specified, ensures strict server-side execution order of concurrent calls with the same queue ID. * @param ?\Amp\Cancellation $cancellation Cancellation - * @return array{_: 'messages.emojiGroupsNotModified'}|array{_: 'messages.emojiGroups', hash: int, groups: list}>} @see https://docs.madelineproto.xyz/API_docs/types/messages.EmojiGroups.html + * @return array{_: 'messages.emojiGroupsNotModified'}|array{_: 'messages.emojiGroups', hash: int, groups: list}|array{_: 'emojiGroupGreeting', title: string, icon_emoji_id: int, emoticons: list}|array{_: 'emojiGroupPremium', title: string, icon_emoji_id: int}>} @see https://docs.madelineproto.xyz/API_docs/types/messages.EmojiGroups.html */ public function getEmojiGroups(int|null $hash = 0, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null): array; @@ -2310,7 +2310,7 @@ interface Messages * @param ?int $floodWaitLimit Can be used to specify a custom flood wait limit: if a FLOOD_WAIT_ rate limiting error is received with a waiting period bigger than this integer, an RPCErrorException will be thrown; otherwise, MadelineProto will simply wait for the specified amount of time. Defaults to the value specified in the settings: https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/RPC.html#setfloodtimeout-int-floodtimeout-self * @param ?string $queueId If specified, ensures strict server-side execution order of concurrent calls with the same queue ID. * @param ?\Amp\Cancellation $cancellation Cancellation - * @return array{_: 'messages.emojiGroupsNotModified'}|array{_: 'messages.emojiGroups', hash: int, groups: list}>} @see https://docs.madelineproto.xyz/API_docs/types/messages.EmojiGroups.html + * @return array{_: 'messages.emojiGroupsNotModified'}|array{_: 'messages.emojiGroups', hash: int, groups: list}|array{_: 'emojiGroupGreeting', title: string, icon_emoji_id: int, emoticons: list}|array{_: 'emojiGroupPremium', title: string, icon_emoji_id: int}>} @see https://docs.madelineproto.xyz/API_docs/types/messages.EmojiGroups.html */ public function getEmojiStatusGroups(int|null $hash = 0, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null): array; @@ -2320,7 +2320,7 @@ interface Messages * @param ?int $floodWaitLimit Can be used to specify a custom flood wait limit: if a FLOOD_WAIT_ rate limiting error is received with a waiting period bigger than this integer, an RPCErrorException will be thrown; otherwise, MadelineProto will simply wait for the specified amount of time. Defaults to the value specified in the settings: https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/RPC.html#setfloodtimeout-int-floodtimeout-self * @param ?string $queueId If specified, ensures strict server-side execution order of concurrent calls with the same queue ID. * @param ?\Amp\Cancellation $cancellation Cancellation - * @return array{_: 'messages.emojiGroupsNotModified'}|array{_: 'messages.emojiGroups', hash: int, groups: list}>} @see https://docs.madelineproto.xyz/API_docs/types/messages.EmojiGroups.html + * @return array{_: 'messages.emojiGroupsNotModified'}|array{_: 'messages.emojiGroups', hash: int, groups: list}|array{_: 'emojiGroupGreeting', title: string, icon_emoji_id: int, emoticons: list}|array{_: 'emojiGroupPremium', title: string, icon_emoji_id: int}>} @see https://docs.madelineproto.xyz/API_docs/types/messages.EmojiGroups.html */ public function getEmojiProfilePhotoGroups(int|null $hash = 0, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null): array; @@ -2632,4 +2632,14 @@ interface Messages * @return array{_: 'messages.myStickers', count: int, sets: list}|array{_: 'photoPathSize', type: string, bytes: string}|array{_: 'photoSize', location: array{_: 'fileLocationUnavailable', volume_id: int, local_id: int, secret: int}|array{_: 'fileLocation', dc_id: int, volume_id: int, local_id: int, secret: int}, type: string, w: int, h: int, size: int}|array{_: 'photoCachedSize', location: array{_: 'fileLocationUnavailable', volume_id: int, local_id: int, secret: int}|array{_: 'fileLocation', dc_id: int, volume_id: int, local_id: int, secret: int}, type: string, w: int, h: int, bytes: string}>, thumb_dc_id?: int, thumb_version?: int, thumb_document_id?: int, count: int, hash: int}, cover: array{_: 'documentEmpty', id: array}|array{_: 'document', id: array, access_hash: array, file_reference: array, date: array, mime_type: array, size: array, thumbs?: list, video_thumbs?: list, dc_id: array, attributes: list}}|array{_: 'stickerSetMultiCovered', set: array{_: 'stickerSet', archived: bool, official: bool, masks: bool, emojis: bool, text_color: bool, channel_emoji_status: bool, creator: bool, installed_date?: int, id: int, access_hash: int, title: string, short_name: string, thumbs?: list}|array{_: 'photoPathSize', type: string, bytes: string}|array{_: 'photoSize', location: array{_: 'fileLocationUnavailable', volume_id: int, local_id: int, secret: int}|array{_: 'fileLocation', dc_id: int, volume_id: int, local_id: int, secret: int}, type: string, w: int, h: int, size: int}|array{_: 'photoCachedSize', location: array{_: 'fileLocationUnavailable', volume_id: int, local_id: int, secret: int}|array{_: 'fileLocation', dc_id: int, volume_id: int, local_id: int, secret: int}, type: string, w: int, h: int, bytes: string}>, thumb_dc_id?: int, thumb_version?: int, thumb_document_id?: int, count: int, hash: int}, covers: list, video_thumbs?: list, dc_id: array, attributes: list}>}|array{_: 'stickerSetFullCovered', set: array{_: 'stickerSet', archived: bool, official: bool, masks: bool, emojis: bool, text_color: bool, channel_emoji_status: bool, creator: bool, installed_date?: int, id: int, access_hash: int, title: string, short_name: string, thumbs?: list}|array{_: 'photoPathSize', type: string, bytes: string}|array{_: 'photoSize', location: array{_: 'fileLocationUnavailable', volume_id: int, local_id: int, secret: int}|array{_: 'fileLocation', dc_id: int, volume_id: int, local_id: int, secret: int}, type: string, w: int, h: int, size: int}|array{_: 'photoCachedSize', location: array{_: 'fileLocationUnavailable', volume_id: int, local_id: int, secret: int}|array{_: 'fileLocation', dc_id: int, volume_id: int, local_id: int, secret: int}, type: string, w: int, h: int, bytes: string}>, thumb_dc_id?: int, thumb_version?: int, thumb_document_id?: int, count: int, hash: int}, packs: list}>, keywords: list}>, documents: list, video_thumbs?: list, dc_id: array, attributes: list}>}|array{_: 'stickerSetNoCovered', set: array{_: 'stickerSet', archived: bool, official: bool, masks: bool, emojis: bool, text_color: bool, channel_emoji_status: bool, creator: bool, installed_date?: int, id: int, access_hash: int, title: string, short_name: string, thumbs?: list}|array{_: 'photoPathSize', type: string, bytes: string}|array{_: 'photoSize', location: array{_: 'fileLocationUnavailable', volume_id: int, local_id: int, secret: int}|array{_: 'fileLocation', dc_id: int, volume_id: int, local_id: int, secret: int}, type: string, w: int, h: int, size: int}|array{_: 'photoCachedSize', location: array{_: 'fileLocationUnavailable', volume_id: int, local_id: int, secret: int}|array{_: 'fileLocation', dc_id: int, volume_id: int, local_id: int, secret: int}, type: string, w: int, h: int, bytes: string}>, thumb_dc_id?: int, thumb_version?: int, thumb_document_id?: int, count: int, hash: int}}>} @see https://docs.madelineproto.xyz/API_docs/types/messages.MyStickers.html */ public function getMyStickers(int|null $offset_id = 0, int|null $limit = 0, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null): array; + + /** + * + * + * @param ?int $floodWaitLimit Can be used to specify a custom flood wait limit: if a FLOOD_WAIT_ rate limiting error is received with a waiting period bigger than this integer, an RPCErrorException will be thrown; otherwise, MadelineProto will simply wait for the specified amount of time. Defaults to the value specified in the settings: https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/RPC.html#setfloodtimeout-int-floodtimeout-self + * @param ?string $queueId If specified, ensures strict server-side execution order of concurrent calls with the same queue ID. + * @param ?\Amp\Cancellation $cancellation Cancellation + * @return array{_: 'messages.emojiGroupsNotModified'}|array{_: 'messages.emojiGroups', hash: int, groups: list}|array{_: 'emojiGroupGreeting', title: string, icon_emoji_id: int, emoticons: list}|array{_: 'emojiGroupPremium', title: string, icon_emoji_id: int}>} @see https://docs.madelineproto.xyz/API_docs/types/messages.EmojiGroups.html + */ + public function getEmojiStickerGroups(int|null $hash = 0, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null): array; } diff --git a/src/Namespace/Stats.php b/src/Namespace/Stats.php index b145ed92a..c9dc51912 100644 --- a/src/Namespace/Stats.php +++ b/src/Namespace/Stats.php @@ -108,7 +108,7 @@ interface Stats * @param ?int $floodWaitLimit Can be used to specify a custom flood wait limit: if a FLOOD_WAIT_ rate limiting error is received with a waiting period bigger than this integer, an RPCErrorException will be thrown; otherwise, MadelineProto will simply wait for the specified amount of time. Defaults to the value specified in the settings: https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/RPC.html#setfloodtimeout-int-floodtimeout-self * @param ?string $queueId If specified, ensures strict server-side execution order of concurrent calls with the same queue ID. * @param ?\Amp\Cancellation $cancellation Cancellation - * @return array{_: 'stats.broadcastRevenueStats', top_hours_graph: array{_: 'statsGraphAsync', token: string}|array{_: 'statsGraphError', error: string}|array{_: 'statsGraph', json: mixed, zoom_token?: string}, revenue_graph: array{_: 'statsGraphAsync', token: string}|array{_: 'statsGraphError', error: string}|array{_: 'statsGraph', json: mixed, zoom_token?: string}, usd_rate: float, current_balance: int, available_balance: int, overall_revenue: int} @see https://docs.madelineproto.xyz/API_docs/types/stats.BroadcastRevenueStats.html + * @return array{_: 'stats.broadcastRevenueStats', top_hours_graph: array{_: 'statsGraphAsync', token: string}|array{_: 'statsGraphError', error: string}|array{_: 'statsGraph', json: mixed, zoom_token?: string}, revenue_graph: array{_: 'statsGraphAsync', token: string}|array{_: 'statsGraphError', error: string}|array{_: 'statsGraph', json: mixed, zoom_token?: string}, balances: array{_: 'broadcastRevenueBalances', current_balance: int, available_balance: int, overall_revenue: int}, usd_rate: float} @see https://docs.madelineproto.xyz/API_docs/types/stats.BroadcastRevenueStats.html */ public function getBroadcastRevenueStats(bool|null $dark = null, array|int|string|null $channel = null, ?int $floodWaitLimit = null, ?string $queueId = null, ?\Amp\Cancellation $cancellation = null): array; diff --git a/src/TL_telegram_v179.tl b/src/TL_telegram_v179.tl index a75781792..963785e0b 100644 --- a/src/TL_telegram_v179.tl +++ b/src/TL_telegram_v179.tl @@ -1519,6 +1519,8 @@ emojiListNotModified#481eadfa = EmojiList; emojiList#7a1e11d1 hash:long document_id:Vector = EmojiList; emojiGroup#7a9abda9 title:string icon_emoji_id:long emoticons:Vector = EmojiGroup; +emojiGroupGreeting#80d26cc7 title:string icon_emoji_id:long emoticons:Vector = EmojiGroup; +emojiGroupPremium#93bcf34 title:string icon_emoji_id:long = EmojiGroup; messages.emojiGroupsNotModified#6fb4ad87 = messages.EmojiGroups; messages.emojiGroups#881fb94b hash:int groups:Vector = messages.EmojiGroups; @@ -1762,7 +1764,7 @@ channels.sponsoredMessageReportResultChooseOption#846f9e42 title:string options: channels.sponsoredMessageReportResultAdsHidden#3e3bcf2f = channels.SponsoredMessageReportResult; channels.sponsoredMessageReportResultReported#ad798849 = channels.SponsoredMessageReportResult; -stats.broadcastRevenueStats#d07b4bad top_hours_graph:StatsGraph revenue_graph:StatsGraph current_balance:long available_balance:long overall_revenue:long usd_rate:double = stats.BroadcastRevenueStats; +stats.broadcastRevenueStats#5407e297 top_hours_graph:StatsGraph revenue_graph:StatsGraph balances:BroadcastRevenueBalances usd_rate:double = stats.BroadcastRevenueStats; stats.broadcastRevenueWithdrawalUrl#ec659737 url:string = stats.BroadcastRevenueWithdrawalUrl; @@ -1777,6 +1779,8 @@ reactionNotificationsFromAll#4b9e22a0 = ReactionNotificationsFrom; reactionsNotifySettings#56e34970 flags:# messages_notify_from:flags.0?ReactionNotificationsFrom stories_notify_from:flags.1?ReactionNotificationsFrom sound:NotificationSound show_previews:Bool = ReactionsNotifySettings; +broadcastRevenueBalances#8438f1c6 current_balance:long available_balance:long overall_revenue:long = BroadcastRevenueBalances; + ---functions--- invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; @@ -2165,6 +2169,7 @@ messages.sendQuickReplyMessages#6c750de1 peer:InputPeer shortcut_id:int id:Vecto messages.deleteQuickReplyMessages#e105e910 shortcut_id:int id:Vector = Updates; messages.toggleDialogFilterTags#fd2dda49 enabled:Bool = Bool; messages.getMyStickers#d0b5e1fc offset_id:long limit:int = messages.MyStickers; +messages.getEmojiStickerGroups#1dd840f5 hash:int = messages.EmojiGroups; updates.getState#edd4882a = updates.State; updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;