1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 20:54:42 +01:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Reza Royani
1b7ff440c4
Merge 0305abeee2 into af346fb046 2024-10-15 07:53:27 +03:30
af346fb046 Update to layer 190 2024-10-15 00:25:37 +02:00
Piagrammist
0305abeee2 Improve comments wording 2024-09-27 20:16:31 +03:30
Piagrammist
016528faa9 Fix: ChannelParticipant::newParticipant default value must be set to Left 2024-09-27 20:13:10 +03:30
11 changed files with 35 additions and 36 deletions

2
docs

@ -1 +1 @@
Subproject commit a08656066e6ecbe4dc2b3cae13ea457253574974
Subproject commit f42967628f037daf1d60faae8049c58da1bd90a3

@ -1 +1 @@
Subproject commit d870841861326100fd22281c8a659f5f023d6aeb
Subproject commit f0d60e35a9566ade2a29cd3e9e7f67f323e9ad4d

View File

@ -51,7 +51,7 @@ final class API extends AbstractAPI
*
* @var string
*/
public const RELEASE = '8.3.2';
public const RELEASE = '8.3.3';
/**
* We're not logged in.
*

View File

@ -11,7 +11,7 @@
* @author Amir Hossein Jafari <amirhosseinjafari8228@gmail.com>
* @copyright 2016-2023 Amir Hossein Jafari <amirhosseinjafari8228@gmail.com>
* @license https://opensource.org/licenses/AGPL-3.0 AGPLv3
* @link https://docs.madelineproto.xyz MadelineProto documentation
* @link https://docs.madelineproto.xyz MadelineProto documentation
*/
namespace danog\MadelineProto\EventHandler\Channel;
@ -19,12 +19,11 @@ namespace danog\MadelineProto\EventHandler\Channel;
use danog\MadelineProto\EventHandler\ChatInvite;
use danog\MadelineProto\EventHandler\Participant;
use danog\MadelineProto\EventHandler\Participant\Left;
use danog\MadelineProto\EventHandler\Participant\Member;
use danog\MadelineProto\EventHandler\Update;
use danog\MadelineProto\MTProto;
/**
* A participant has left, joined, was banned or admined in a [channel or supergroup](https://core.telegram.org/api/channel).
* A participant has left, joined, was banned or admin'd in a [channel or supergroup](https://core.telegram.org/api/channel).
*/
final class ChannelParticipant extends Update
{
@ -63,13 +62,13 @@ final class ChannelParticipant extends Update
$this->inviteLink = isset($rawChannelParticipant['invite'])
? ChatInvite::fromRawChatInvite($rawChannelParticipant['invite'])
: null;
// If null, user lefted channel
// If null, user wasn't a participant.
$this->prevParticipant = isset($rawChannelParticipant['prev_participant'])
? Participant::fromRawParticipant($rawChannelParticipant['prev_participant'])
: new Left(['peer' => $this->userId]);
// if null, user joind
// If null, user has left.
$this->newParticipant = isset($rawChannelParticipant['new_participant'])
? Participant::fromRawParticipant($rawChannelParticipant['new_participant'])
: new Member(['user_id' => $this->userId, 'date' => $this->date]);
: new Left(['peer' => $this->userId]);
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -27,11 +27,11 @@ final class TLSchema extends SettingsAbstract
/**
* TL layer version.
*/
protected int $layer = 189;
protected int $layer = 190;
/**
* API schema path.
*/
protected string $APISchema = __DIR__ . '/../TL_telegram_v189.tl';
protected string $APISchema = __DIR__ . '/../TL_telegram_v190.tl';
/**
* MTProto schema path.
*/

View File

@ -169,13 +169,13 @@ messageActionSetChatTheme#aa786345 emoticon:string = MessageAction;
messageActionChatJoinedByRequest#ebbca3cb = MessageAction;
messageActionWebViewDataSentMe#47dd8079 text:string data:string = MessageAction;
messageActionWebViewDataSent#b4c38cb5 text:string = MessageAction;
messageActionGiftPremium#c83d6aec flags:# currency:string amount:long months:int crypto_currency:flags.0?string crypto_amount:flags.0?long = MessageAction;
messageActionGiftPremium#6c6274fa flags:# currency:string amount:long months:int crypto_currency:flags.0?string crypto_amount:flags.0?long message:flags.1?TextWithEntities = MessageAction;
messageActionTopicCreate#d999256 flags:# title:string icon_color:int icon_emoji_id:flags.0?long = MessageAction;
messageActionTopicEdit#c0944820 flags:# title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = MessageAction;
messageActionSuggestProfilePhoto#57de635e photo:Photo = MessageAction;
messageActionRequestedPeer#31518e9b button_id:int peers:Vector<Peer> = MessageAction;
messageActionSetChatWallPaper#5060a3f4 flags:# same:flags.0?true for_both:flags.1?true wallpaper:WallPaper = MessageAction;
messageActionGiftCode#678c2e09 flags:# via_giveaway:flags.0?true unclaimed:flags.2?true boost_peer:flags.1?Peer months:int slug:string currency:flags.2?string amount:flags.2?long crypto_currency:flags.3?string crypto_amount:flags.3?long = MessageAction;
messageActionGiftCode#56d03994 flags:# via_giveaway:flags.0?true unclaimed:flags.2?true boost_peer:flags.1?Peer months:int slug:string currency:flags.2?string amount:flags.2?long crypto_currency:flags.3?string crypto_amount:flags.3?long message:flags.4?TextWithEntities = MessageAction;
messageActionGiveawayLaunch#a80f51e4 flags:# stars:flags.0?long = MessageAction;
messageActionGiveawayResults#87e2f155 flags:# stars:flags.0?true winners_count:int unclaimed_count:int = MessageAction;
messageActionBoostApply#cc02aa6d boosts:int = MessageAction;
@ -1476,7 +1476,7 @@ help.premiumPromo#5334759c status_text:string status_entities:Vector<MessageEnti
inputStorePaymentPremiumSubscription#a6751e66 flags:# restore:flags.0?true upgrade:flags.1?true = InputStorePaymentPurpose;
inputStorePaymentGiftPremium#616f7fe8 user_id:InputUser currency:string amount:long = InputStorePaymentPurpose;
inputStorePaymentPremiumGiftCode#a3805f3f flags:# users:Vector<InputUser> boost_peer:flags.0?InputPeer currency:string amount:long = InputStorePaymentPurpose;
inputStorePaymentPremiumGiftCode#fb790393 flags:# users:Vector<InputUser> boost_peer:flags.0?InputPeer currency:string amount:long message:flags.1?TextWithEntities = InputStorePaymentPurpose;
inputStorePaymentPremiumGiveaway#160544ca flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.3?true boost_peer:InputPeer additional_peers:flags.1?Vector<InputPeer> countries_iso2:flags.2?Vector<string> prize_description:flags.4?string random_id:long until_date:int currency:string amount:long = InputStorePaymentPurpose;
inputStorePaymentStarsTopup#dddd0f56 stars:long currency:string amount:long = InputStorePaymentPurpose;
inputStorePaymentStarsGift#1d741ef7 user_id:InputUser stars:long currency:string amount:long = InputStorePaymentPurpose;
@ -2565,4 +2565,4 @@ smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
// LAYER 189
// LAYER 190