Update API scheme to layer 96.
This commit is contained in:
		
							parent
							
								
									f1b0b60340
								
							
						
					
					
						commit
						0cd7399dc9
					
				
					 4 changed files with 16 additions and 6 deletions
				
			
		| 
						 | 
					@ -446,7 +446,7 @@ updateContactsReset#7084a7be = Update;
 | 
				
			||||||
updateChannelAvailableMessages#70db6837 channel_id:int available_min_id:int = Update;
 | 
					updateChannelAvailableMessages#70db6837 channel_id:int available_min_id:int = Update;
 | 
				
			||||||
updateDialogUnreadMark#e16459c3 flags:# unread:flags.0?true peer:DialogPeer = Update;
 | 
					updateDialogUnreadMark#e16459c3 flags:# unread:flags.0?true peer:DialogPeer = Update;
 | 
				
			||||||
updateUserPinnedMessage#4c43da18 user_id:int id:int = Update;
 | 
					updateUserPinnedMessage#4c43da18 user_id:int id:int = Update;
 | 
				
			||||||
updateChatPinnedMessage#22893b26 chat_id:int id:int = Update;
 | 
					updateChatPinnedMessage#e10db349 chat_id:int id:int version:int = Update;
 | 
				
			||||||
updateMessagePoll#aca1657b flags:# poll_id:long poll:flags.0?Poll results:PollResults = Update;
 | 
					updateMessagePoll#aca1657b flags:# poll_id:long poll:flags.0?Poll results:PollResults = Update;
 | 
				
			||||||
updateChatDefaultBannedRights#54c01850 peer:Peer default_banned_rights:ChatBannedRights version:int = Update;
 | 
					updateChatDefaultBannedRights#54c01850 peer:Peer default_banned_rights:ChatBannedRights version:int = Update;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1116,6 +1116,10 @@ codeSettings#302f59f3 flags:# allow_flashcall:flags.0?true current_number:flags.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wallPaperSettings#a12f40b8 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int intensity:flags.3?int = WallPaperSettings;
 | 
					wallPaperSettings#a12f40b8 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int intensity:flags.3?int = WallPaperSettings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					autoDownloadSettings#d246fd47 flags:# disabled:flags.0?true video_preload_large:flags.1?true audio_preload_next:flags.2?true phonecalls_less_data:flags.3?true photo_size_max:int video_size_max:int file_size_max:int = AutoDownloadSettings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					account.autoDownloadSettings#63cacf26 low:AutoDownloadSettings medium:AutoDownloadSettings high:AutoDownloadSettings = account.AutoDownloadSettings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
---functions---
 | 
					---functions---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
 | 
					invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
 | 
				
			||||||
| 
						 | 
					@ -1195,6 +1199,8 @@ account.uploadWallPaper#dd853661 file:InputFile mime_type:string settings:WallPa
 | 
				
			||||||
account.saveWallPaper#6c5a5b37 wallpaper:InputWallPaper unsave:Bool settings:WallPaperSettings = Bool;
 | 
					account.saveWallPaper#6c5a5b37 wallpaper:InputWallPaper unsave:Bool settings:WallPaperSettings = Bool;
 | 
				
			||||||
account.installWallPaper#feed5769 wallpaper:InputWallPaper settings:WallPaperSettings = Bool;
 | 
					account.installWallPaper#feed5769 wallpaper:InputWallPaper settings:WallPaperSettings = Bool;
 | 
				
			||||||
account.resetWallPapers#bb3b9804 = Bool;
 | 
					account.resetWallPapers#bb3b9804 = Bool;
 | 
				
			||||||
 | 
					account.getAutoDownloadSettings#56da0b3f = account.AutoDownloadSettings;
 | 
				
			||||||
 | 
					account.saveAutoDownloadSettings#76f36233 flags:# low:flags.0?true high:flags.1?true settings:AutoDownloadSettings = Bool;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;
 | 
					users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;
 | 
				
			||||||
users.getFullUser#ca30a5b1 id:InputUser = UserFull;
 | 
					users.getFullUser#ca30a5b1 id:InputUser = UserFull;
 | 
				
			||||||
| 
						 | 
					@ -1321,7 +1327,7 @@ messages.updatePinnedMessage#d2aaf7ec flags:# silent:flags.0?true peer:InputPeer
 | 
				
			||||||
messages.sendVote#10ea6184 peer:InputPeer msg_id:int options:Vector<bytes> = Updates;
 | 
					messages.sendVote#10ea6184 peer:InputPeer msg_id:int options:Vector<bytes> = Updates;
 | 
				
			||||||
messages.getPollResults#73bb643b peer:InputPeer msg_id:int = Updates;
 | 
					messages.getPollResults#73bb643b peer:InputPeer msg_id:int = Updates;
 | 
				
			||||||
messages.getOnlines#6e2be050 peer:InputPeer = ChatOnlines;
 | 
					messages.getOnlines#6e2be050 peer:InputPeer = ChatOnlines;
 | 
				
			||||||
messages.getStatsURL#83f6c0cd peer:InputPeer = StatsURL;
 | 
					messages.getStatsURL#812c2ae6 flags:# dark:flags.0?true peer:InputPeer params:string = StatsURL;
 | 
				
			||||||
messages.editChatAbout#def60797 peer:InputPeer about:string = Bool;
 | 
					messages.editChatAbout#def60797 peer:InputPeer about:string = Bool;
 | 
				
			||||||
messages.editChatDefaultBannedRights#a5866b41 peer:InputPeer banned_rights:ChatBannedRights = Updates;
 | 
					messages.editChatDefaultBannedRights#a5866b41 peer:InputPeer banned_rights:ChatBannedRights = Updates;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1414,7 +1420,7 @@ phone.acceptCall#3bd2b4a0 peer:InputPhoneCall g_b:bytes protocol:PhoneCallProtoc
 | 
				
			||||||
phone.confirmCall#2efe1722 peer:InputPhoneCall g_a:bytes key_fingerprint:long protocol:PhoneCallProtocol = phone.PhoneCall;
 | 
					phone.confirmCall#2efe1722 peer:InputPhoneCall g_a:bytes key_fingerprint:long protocol:PhoneCallProtocol = phone.PhoneCall;
 | 
				
			||||||
phone.receivedCall#17d54f61 peer:InputPhoneCall = Bool;
 | 
					phone.receivedCall#17d54f61 peer:InputPhoneCall = Bool;
 | 
				
			||||||
phone.discardCall#78d413a6 peer:InputPhoneCall duration:int reason:PhoneCallDiscardReason connection_id:long = Updates;
 | 
					phone.discardCall#78d413a6 peer:InputPhoneCall duration:int reason:PhoneCallDiscardReason connection_id:long = Updates;
 | 
				
			||||||
phone.setCallRating#1c536a34 peer:InputPhoneCall rating:int comment:string = Updates;
 | 
					phone.setCallRating#59ead627 flags:# user_initiative:flags.0?true peer:InputPhoneCall rating:int comment:string = Updates;
 | 
				
			||||||
phone.saveCallDebug#277add7e peer:InputPhoneCall debug:DataJSON = Bool;
 | 
					phone.saveCallDebug#277add7e peer:InputPhoneCall debug:DataJSON = Bool;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
langpack.getLangPack#f2f2330a lang_pack:string lang_code:string = LangPackDifference;
 | 
					langpack.getLangPack#f2f2330a lang_pack:string lang_code:string = LangPackDifference;
 | 
				
			||||||
| 
						 | 
					@ -1423,4 +1429,4 @@ langpack.getDifference#cd984aa5 lang_pack:string lang_code:string from_version:i
 | 
				
			||||||
langpack.getLanguages#42c6978f lang_pack:string = Vector<LangPackLanguage>;
 | 
					langpack.getLanguages#42c6978f lang_pack:string = Vector<LangPackLanguage>;
 | 
				
			||||||
langpack.getLanguage#6a596502 lang_pack:string lang_code:string = LangPackLanguage;
 | 
					langpack.getLanguage#6a596502 lang_pack:string lang_code:string = LangPackLanguage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// LAYER 95
 | 
					// LAYER 96
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -116,6 +116,7 @@ void RateCallBox::send() {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	auto comment = _comment ? _comment->getLastText().trimmed() : QString();
 | 
						auto comment = _comment ? _comment->getLastText().trimmed() : QString();
 | 
				
			||||||
	_requestId = request(MTPphone_SetCallRating(
 | 
						_requestId = request(MTPphone_SetCallRating(
 | 
				
			||||||
 | 
							MTP_flags(0),
 | 
				
			||||||
		MTP_inputPhoneCall(MTP_long(_callId), MTP_long(_callAccessHash)),
 | 
							MTP_inputPhoneCall(MTP_long(_callId), MTP_long(_callAccessHash)),
 | 
				
			||||||
		MTP_int(_rating),
 | 
							MTP_int(_rating),
 | 
				
			||||||
		MTP_string(comment)
 | 
							MTP_string(comment)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -162,7 +162,7 @@ auto ChatData::applyUpdateVersion(int version) -> UpdateStatus {
 | 
				
			||||||
		return UpdateStatus::TooOld;
 | 
							return UpdateStatus::TooOld;
 | 
				
			||||||
	} else if (_version + 1 < version) {
 | 
						} else if (_version + 1 < version) {
 | 
				
			||||||
		invalidateParticipants();
 | 
							invalidateParticipants();
 | 
				
			||||||
		session().api().requestPeer(this);
 | 
							session().api().requestFullPeer(this);
 | 
				
			||||||
		return UpdateStatus::Skipped;
 | 
							return UpdateStatus::Skipped;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	setVersion(version);
 | 
						setVersion(version);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4555,7 +4555,10 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
 | 
				
			||||||
	case mtpc_updateChatPinnedMessage: {
 | 
						case mtpc_updateChatPinnedMessage: {
 | 
				
			||||||
		const auto &d = update.c_updateChatPinnedMessage();
 | 
							const auto &d = update.c_updateChatPinnedMessage();
 | 
				
			||||||
		if (const auto chat = session().data().chatLoaded(d.vchat_id.v)) {
 | 
							if (const auto chat = session().data().chatLoaded(d.vchat_id.v)) {
 | 
				
			||||||
			chat->setPinnedMessageId(d.vid.v);
 | 
								const auto status = chat->applyUpdateVersion(d.vversion.v);
 | 
				
			||||||
 | 
								if (status == ChatData::UpdateStatus::Good) {
 | 
				
			||||||
 | 
									chat->setPinnedMessageId(d.vid.v);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} break;
 | 
						} break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue