This commit is contained in:
Daniil Gentili 2019-06-24 16:35:37 +02:00
commit 58d71a390a
11 changed files with 1608 additions and 37 deletions

View File

@ -74,6 +74,7 @@ Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgro
* [Async echo](https://docs.madelineproto.xyz/docs/ASYNC.html#async-echo-does-not-block-the-main-thread)
* [MadelineProto artax HTTP client](https://docs.madelineproto.xyz/docs/ASYNC.html#madelineproto-artax-http-client)
* [Async forking](https://docs.madelineproto.xyz/docs/ASYNC.html#async-forking-does-green-thread-forking)
* [Async flock](https://docs.madelineproto.xyz/docs/ASYNC.html#async-flock)
* [Combining async operations](https://docs.madelineproto.xyz/docs/ASYNC.html#combining-async-operations)
* [MadelineProto async loop APIs](https://docs.madelineproto.xyz/docs/ASYNC.html#async-loop-apis)
* [Loop](https://docs.madelineproto.xyz/docs/ASYNC.html#loop)
@ -174,12 +175,14 @@ Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgro
* [Make a phone call and play a song](https://docs.madelineproto.xyz/docs/CALLS.html)
* [Create a secret chat bot](https://docs.madelineproto.xyz/docs/SECRET_CHATS.html)
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_acceptUrlAuth.html" name="messages_acceptUrlAuth">Accept URL authorization: messages.acceptUrlAuth</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/contacts_acceptContact.html" name="contacts_acceptContact">Accept contact: contacts.acceptContact</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/account_acceptAuthorization.html" name="account_acceptAuthorization">Accept telegram passport authorization: account.acceptAuthorization</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/help_acceptTermsOfService.html" name="help_acceptTermsOfService">Accept telegram's TOS: help.acceptTermsOfService</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_installStickerSet.html" name="messages_installStickerSet">Add a sticker set: messages.installStickerSet</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_faveSticker.html" name="messages_faveSticker">Add a sticker to favorites: messages.faveSticker</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_saveRecentSticker.html" name="messages_saveRecentSticker">Add a sticker to recent stickers: messages.saveRecentSticker</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_addChatUser.html" name="messages_addChatUser">Add a user to a normal chat (use channels->inviteToChannel for supergroups): messages.addChatUser</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/contacts_addContact.html" name="contacts_addContact">Add contact: contacts.addContact</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/contacts_importContacts.html" name="contacts_importContacts">Add phone number as contact: contacts.importContacts</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/stickers_addStickerToSet.html" name="stickers_addStickerToSet">Add sticker to stickerset: stickers.addStickerToSet</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/channels_inviteToChannel.html" name="channels_inviteToChannel">Add users to channel/supergroup: channels.inviteToChannel</a>
@ -215,7 +218,6 @@ Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgro
* <a href="https://docs.madelineproto.xyz/API_docs/methods/account_resetAuthorization.html" name="account_resetAuthorization">Delete a certain session: account.resetAuthorization</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/account_resetWebAuthorization.html" name="account_resetWebAuthorization">Delete a certain telegram web login authorization: account.resetWebAuthorization</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/channels_deleteChannel.html" name="channels_deleteChannel">Delete a channel/supergroup: channels.deleteChannel</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/contacts_deleteContact.html" name="contacts_deleteContact">Delete a contact: contacts.deleteContact</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_deleteChatUser.html" name="messages_deleteChatUser">Delete a user from a chat (not supergroup): messages.deleteChatUser</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/auth_resetAuthorizations.html" name="auth_resetAuthorizations">Delete all logged-in sessions.: auth.resetAuthorizations</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/channels_deleteUserHistory.html" name="channels_deleteUserHistory">Delete all messages of a user in a channel/supergroup: channels.deleteUserHistory</a>
@ -237,8 +239,10 @@ Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgro
* <a href="https://docs.madelineproto.xyz/API_docs/methods/channels_editAdmin.html" name="channels_editAdmin">Edit admin permissions of a user in a channel/supergroup: channels.editAdmin</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_editChatAdmin.html" name="messages_editChatAdmin">Edit admin permissions: messages.editChatAdmin</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_editChatAbout.html" name="messages_editChatAbout">Edit chat info: messages.editChatAbout</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/channels_editCreator.html" name="channels_editCreator">Edit creator of channel: channels.editCreator</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_editChatDefaultBannedRights.html" name="messages_editChatDefaultBannedRights">Edit default rights of chat: messages.editChatDefaultBannedRights</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/folders_editPeerFolders.html" name="folders_editPeerFolders">Edit folder: folders.editPeerFolders</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/channels_editLocation.html" name="channels_editLocation">Edit location (geochats): channels.editLocation</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_editChatPhoto.html" name="messages_editChatPhoto">Edit the photo of a normal chat (not supergroup): messages.editChatPhoto</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/channels_editPhoto.html" name="channels_editPhoto">Edit the photo of a supergroup/channel: channels.editPhoto</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_editChatTitle.html" name="messages_editChatTitle">Edit the title of a normal chat (not supergroup): messages.editChatTitle</a>
@ -270,7 +274,6 @@ Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgro
* <a href="https://docs.madelineproto.xyz/API_docs/methods/phone_getCallConfig.html" name="phone_getCallConfig">Get call configuration: phone.getCallConfig</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/channels_getMessages.html" name="channels_getMessages">Get channel/supergroup messages: channels.getMessages</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/channels_getParticipants.html" name="channels_getParticipants">Get channel/supergroup participants (you should use `$MadelineProto->get_pwr_chat($id)` instead): channels.getParticipants</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/channels_getBroadcastsForDiscussion.html" name="channels_getBroadcastsForDiscussion">Get channels for discussion: channels.getBroadcastsForDiscussion</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_getCommonChats.html" name="messages_getCommonChats">Get chats in common with a user: messages.getCommonChats</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/contacts_getContactIDs.html" name="contacts_getContactIDs">Get contacts by IDs: contacts.getContactIDs</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/help_getDeepLinkInfo.html" name="help_getDeepLinkInfo">Get deep link info: help.getDeepLinkInfo</a>
@ -310,6 +313,7 @@ Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgro
* <a href="https://docs.madelineproto.xyz/API_docs/methods/help_getPassportConfig.html" name="help_getPassportConfig">Get passport config: help.getPassportConfig</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/payments_getPaymentForm.html" name="payments_getPaymentForm">Get payment form: payments.getPaymentForm</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/payments_getPaymentReceipt.html" name="payments_getPaymentReceipt">Get payment receipt: payments.getPaymentReceipt</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/contacts_getLocated.html" name="contacts_getLocated">Get people nearby (geochats): contacts.getLocated</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_getPinnedDialogs.html" name="messages_getPinnedDialogs">Get pinned dialogs: messages.getPinnedDialogs</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_getPollResults.html" name="messages_getPollResults">Get poll results: messages.getPollResults</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_getHistory.html" name="messages_getHistory">Get previous messages of a group: messages.getHistory</a>
@ -343,7 +347,7 @@ Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgro
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_getWebPagePreview.html" name="messages_getWebPagePreview">Get webpage preview: messages.getWebPagePreview</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_getDialogs.html" name="messages_getDialogs">Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html: messages.getDialogs</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_searchGlobal.html" name="messages_searchGlobal">Global message search: messages.searchGlobal</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_hideReportSpam.html" name="messages_hideReportSpam">Hide report spam popup: messages.hideReportSpam</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_hidePeerSettingsBar.html" name="messages_hidePeerSettingsBar">Hide peer settings bar: messages.hidePeerSettingsBar</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages_importChatInvite.html" name="messages_importChatInvite">Import chat invite: messages.importChatInvite</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/initConnection.html" name="initConnection">Initializes connection and save information on the user's device and application.: initConnection</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/account_installWallPaper.html" name="account_installWallPaper">Install wallpaper: account.installWallPaper</a>

View File

@ -43,9 +43,9 @@ $docs = [
'readme' => false,
],
[
'tl_schema' => ['telegram' => __DIR__.'/src/danog/MadelineProto/TL_telegram_v100.tl', 'calls' => __DIR__.'/src/danog/MadelineProto/TL_calls.tl', 'secret' => __DIR__.'/src/danog/MadelineProto/TL_secret.tl', 'td' => __DIR__.'/src/danog/MadelineProto/TL_td.tl'],
'title' => 'MadelineProto API documentation (layer 100)',
'description' => 'MadelineProto API documentation (layer 100)',
'tl_schema' => ['telegram' => __DIR__.'/src/danog/MadelineProto/TL_telegram_v102.tl', 'calls' => __DIR__.'/src/danog/MadelineProto/TL_calls.tl', 'secret' => __DIR__.'/src/danog/MadelineProto/TL_secret.tl', 'td' => __DIR__.'/src/danog/MadelineProto/TL_td.tl'],
'title' => 'MadelineProto API documentation (layer 102)',
'description' => 'MadelineProto API documentation (layer 102)',
'output_dir' => __DIR__.'/docs/docs/API_docs',
'readme' => false,
],

View File

@ -14,7 +14,7 @@
"danog/magicalserializer": "^1.0",
"phpseclib/phpseclib": "dev-master#5e7d39153270dfd19d585504b0a29ac65a62adf9 as 2.0.15",
"vlucas/phpdotenv": "^3",
"erusev/parsedown": "^1.6",
"erusev/parsedown": "^1.7",
"ext-mbstring": "*",
"ext-json": "*",
"ext-xml": "*",

2
docs

@ -1 +1 @@
Subproject commit 02967b3019032399364a9fc134f7bb0e674c099a
Subproject commit cbd913fba2249a0055bb732452a67f911119c40a

View File

@ -50,6 +50,7 @@ function getUrl($constructor, $type)
{
$changed = str_replace('.', '_', $constructor);
return "[$constructor](https://github.com/danog/MadelineProtoDocs/blob/geochats/docs/API_docs/$type/$changed.md)";
return "[$constructor](https://docs.madelineproto.xyz/API_docs/$type/$changed.html)";
}
$old = getTL($argv[1]);

View File

@ -270,8 +270,13 @@ The following tags are currently supported:
<strong>bold</strong>
<em>italic</em>
<i>italic</i>
<u>underline</u>
<s>strikethrough</s>
<del>strikethrough</del>
<strike>strikethrough</strike>
<code>inline fixed-width code</code>
<pre>pre-formatted fixed-width code block</pre>
<blockquote>pre-formatted fixed-width code block</blockquote>
<a href="https://github.com">URL</a>
<a href="mention:@danogentili">Mention by username</a>
<a href="mention:186785362">Mention by user id</a>

View File

@ -713,16 +713,7 @@ interface contacts
* InputUser id,
* ]
*
* @return contacts_Link
*/
public function deleteContact(array $params);
/**
* @param array params [
* InputUser id,
* ]
*
* @return bool
* @return Updates
*/
public function deleteContacts(array $params);
@ -829,6 +820,37 @@ interface contacts
* @return bool
*/
public function toggleTopPeers(array $params);
/**
* @param array params [
* boolean add_phone_privacy_exception,
* InputUser id,
* string first_name,
* string last_name,
* string phone,
* ]
*
* @return Updates
*/
public function addContact(array $params);
/**
* @param array params [
* InputUser id,
* ]
*
* @return Updates
*/
public function acceptContact(array $params);
/**
* @param array params [
* InputGeoPoint geo_point,
* ]
*
* @return Updates
*/
public function getLocated(array $params);
}
interface messages
@ -1002,15 +1024,6 @@ interface messages
*/
public function reportSpam(array $params);
/**
* @param array params [
* InputPeer peer,
* ]
*
* @return bool
*/
public function hideReportSpam(array $params);
/**
* @param array params [
* InputPeer peer,
@ -1346,6 +1359,7 @@ interface messages
/**
* @param array params [
* int folder_id,
* string q,
* int offset_rate,
* InputPeer offset_peer,
@ -2023,6 +2037,15 @@ interface messages
* @return UrlAuthResult
*/
public function acceptUrlAuth(array $params);
/**
* @param array params [
* InputPeer peer,
* ]
*
* @return bool
*/
public function hidePeerSettingsBar(array $params);
}
interface updates
@ -2430,6 +2453,8 @@ interface channels
* boolean megagroup,
* string title,
* string about,
* InputGeoPoint geo_point,
* string address,
* ]
*
* @return Updates
@ -2546,9 +2571,14 @@ interface channels
public function toggleSignatures(array $params);
/**
* @param array params [
* boolean by_location,
* boolean check_limit,
* ]
*
* @return messages_Chats
*/
public function getAdminedPublicChannels();
public function getAdminedPublicChannels(array $params);
/**
* @param array params [
@ -2630,11 +2660,6 @@ interface channels
*/
public function getGroupsForDiscussion();
/**
* @return messages_Chats
*/
public function getBroadcastsForDiscussion();
/**
* @param array params [
* InputChannel broadcast,
@ -2644,6 +2669,28 @@ interface channels
* @return bool
*/
public function setDiscussionGroup(array $params);
/**
* @param array params [
* InputChannel channel,
* InputUser user_id,
* InputCheckPasswordSRP password,
* ]
*
* @return Updates
*/
public function editCreator(array $params);
/**
* @param array params [
* InputChannel channel,
* InputGeoPoint geo_point,
* string address,
* ]
*
* @return bool
*/
public function editLocation(array $params);
}
interface bots

View File

@ -5075,6 +5075,66 @@ class Lang
'object_urlAuthResultAccepted' => 'URL authorization accepted',
'object_urlAuthResultAccepted_param_url_type_string' => 'URL',
'object_urlAuthResultDefault' => 'Default result',
'method_contacts.addContact' => 'Add contact',
'method_contacts.addContact_param_add_phone_privacy_exception_type_true' => 'Phone privacy exception?',
'method_contacts.addContact_param_id_type_InputUser' => 'ID',
'method_contacts.addContact_param_first_name_type_string' => 'First name',
'method_contacts.addContact_param_last_name_type_string' => 'Last name',
'method_contacts.addContact_param_phone_type_string' => 'Phone number',
'method_contacts.acceptContact' => 'Accept contact',
'method_contacts.acceptContact_param_id_type_InputUser' => 'ID',
'method_contacts.getLocated' => 'Get people nearby (geochats)',
'method_contacts.getLocated_param_geo_point_type_InputGeoPoint' => 'Current location',
'method_messages.searchGlobal_param_folder_id_type_int' => 'Folder ID',
'method_messages.hidePeerSettingsBar' => 'Hide peer settings bar',
'method_messages.hidePeerSettingsBar_param_peer_type_InputPeer' => 'Peer',
'method_channels.createChannel_param_geo_point_type_InputGeoPoint' => 'Geopoint (geochats)',
'method_channels.createChannel_param_address_type_string' => 'Physical address (geochats)',
'method_channels.getAdminedPublicChannels_param_by_location_type_true' => 'Get channels by location',
'method_channels.getAdminedPublicChannels_param_check_limit_type_true' => 'Check limit',
'method_channels.editCreator' => 'Edit creator of channel',
'method_channels.editCreator_param_channel_type_InputChannel' => 'Channel',
'method_channels.editCreator_param_user_id_type_InputUser' => 'User ID',
'method_channels.editCreator_param_password_type_InputCheckPasswordSRP' => 'Password',
'method_channels.editLocation' => 'Edit location (geochats)',
'method_channels.editLocation_param_channel_type_InputChannel' => 'Channel',
'method_channels.editLocation_param_geo_point_type_InputGeoPoint' => 'Geo point',
'method_channels.editLocation_param_address_type_string' => 'Physical location (geochats)',
'object_channelFull_param_can_set_location_type_true' => 'Can set location?',
'object_channelFull_param_location_type_ChannelLocation' => 'Location',
'object_peerSettings_param_add_contact_type_true' => 'Can add as a contact?',
'object_peerSettings_param_block_contact_type_true' => 'Block contact',
'object_peerSettings_param_share_contact_type_true' => 'Share contact',
'object_peerSettings_param_need_contacts_exception_type_true' => 'Contact exception',
'object_peerSettings_param_report_geo_type_true' => 'Geotype',
'object_inputReportReasonGeoIrrelevant' => 'Irrelevant geochat',
'object_userFull_param_settings_type_PeerSettings' => 'Peer settings',
'object_updatePeerSettings' => 'Peer settings updated',
'object_updatePeerSettings_param_peer_type_Peer' => 'Peer',
'object_updatePeerSettings_param_settings_type_PeerSettings' => 'Settings',
'object_updatePeerLocated' => 'Peer location updated',
'object_updatePeerLocated_param_peers_type_Vector t' => 'Peers',
'object_stickerSet_param_animated_type_true' => 'Animated stickerset?',
'object_messageEntityUnderline' => 'Underline',
'object_messageEntityUnderline_param_offset_type_int' => 'Offset',
'object_messageEntityUnderline_param_length_type_int' => 'Length',
'object_messageEntityStrike' => 'Strikethrough',
'object_messageEntityStrike_param_offset_type_int' => 'Offset',
'object_messageEntityStrike_param_length_type_int' => 'Length',
'object_messageEntityBlockquote' => 'Quote',
'object_messageEntityBlockquote_param_offset_type_int' => 'Offset',
'object_messageEntityBlockquote_param_length_type_int' => 'Length',
'object_channelAdminLogEventActionChangeLocation' => 'Channel location changed',
'object_channelAdminLogEventActionChangeLocation_param_prev_value_type_ChannelLocation' => 'Previous value',
'object_channelAdminLogEventActionChangeLocation_param_new_value_type_ChannelLocation' => 'New value',
'object_channelLocationEmpty' => 'No physical location (normal chat/channel)',
'object_channelLocation' => 'Physical location (getchats)',
'object_channelLocation_param_geo_point_type_GeoPoint' => 'Geo point',
'object_channelLocation_param_address_type_string' => 'Physical address',
'object_peerLocated' => 'Located peer',
'object_peerLocated_param_peer_type_Peer' => 'Peer',
'object_peerLocated_param_expires_type_int' => 'Expiry date',
'object_peerLocated_param_distance_type_int' => 'Distance',
),
);
@ -9991,5 +10051,65 @@ class Lang
'object_urlAuthResultAccepted' => 'URL authorization accepted',
'object_urlAuthResultAccepted_param_url_type_string' => 'URL',
'object_urlAuthResultDefault' => 'Default result',
'method_contacts.addContact' => 'Add contact',
'method_contacts.addContact_param_add_phone_privacy_exception_type_true' => 'Phone privacy exception?',
'method_contacts.addContact_param_id_type_InputUser' => 'ID',
'method_contacts.addContact_param_first_name_type_string' => 'First name',
'method_contacts.addContact_param_last_name_type_string' => 'Last name',
'method_contacts.addContact_param_phone_type_string' => 'Phone number',
'method_contacts.acceptContact' => 'Accept contact',
'method_contacts.acceptContact_param_id_type_InputUser' => 'ID',
'method_contacts.getLocated' => 'Get people nearby (geochats)',
'method_contacts.getLocated_param_geo_point_type_InputGeoPoint' => 'Current location',
'method_messages.searchGlobal_param_folder_id_type_int' => 'Folder ID',
'method_messages.hidePeerSettingsBar' => 'Hide peer settings bar',
'method_messages.hidePeerSettingsBar_param_peer_type_InputPeer' => 'Peer',
'method_channels.createChannel_param_geo_point_type_InputGeoPoint' => 'Geopoint (geochats)',
'method_channels.createChannel_param_address_type_string' => 'Physical address (geochats)',
'method_channels.getAdminedPublicChannels_param_by_location_type_true' => 'Get channels by location',
'method_channels.getAdminedPublicChannels_param_check_limit_type_true' => 'Check limit',
'method_channels.editCreator' => 'Edit creator of channel',
'method_channels.editCreator_param_channel_type_InputChannel' => 'Channel',
'method_channels.editCreator_param_user_id_type_InputUser' => 'User ID',
'method_channels.editCreator_param_password_type_InputCheckPasswordSRP' => 'Password',
'method_channels.editLocation' => 'Edit location (geochats)',
'method_channels.editLocation_param_channel_type_InputChannel' => 'Channel',
'method_channels.editLocation_param_geo_point_type_InputGeoPoint' => 'Geo point',
'method_channels.editLocation_param_address_type_string' => 'Physical location (geochats)',
'object_channelFull_param_can_set_location_type_true' => 'Can set location?',
'object_channelFull_param_location_type_ChannelLocation' => 'Location',
'object_peerSettings_param_add_contact_type_true' => 'Can add as a contact?',
'object_peerSettings_param_block_contact_type_true' => 'Block contact',
'object_peerSettings_param_share_contact_type_true' => 'Share contact',
'object_peerSettings_param_need_contacts_exception_type_true' => 'Contact exception',
'object_peerSettings_param_report_geo_type_true' => 'Geotype',
'object_inputReportReasonGeoIrrelevant' => 'Irrelevant geochat',
'object_userFull_param_settings_type_PeerSettings' => 'Peer settings',
'object_updatePeerSettings' => 'Peer settings updated',
'object_updatePeerSettings_param_peer_type_Peer' => 'Peer',
'object_updatePeerSettings_param_settings_type_PeerSettings' => 'Settings',
'object_updatePeerLocated' => 'Peer location updated',
'object_updatePeerLocated_param_peers_type_Vector t' => 'Peers',
'object_stickerSet_param_animated_type_true' => 'Animated stickerset?',
'object_messageEntityUnderline' => 'Underline',
'object_messageEntityUnderline_param_offset_type_int' => 'Offset',
'object_messageEntityUnderline_param_length_type_int' => 'Length',
'object_messageEntityStrike' => 'Strikethrough',
'object_messageEntityStrike_param_offset_type_int' => 'Offset',
'object_messageEntityStrike_param_length_type_int' => 'Length',
'object_messageEntityBlockquote' => 'Quote',
'object_messageEntityBlockquote_param_offset_type_int' => 'Offset',
'object_messageEntityBlockquote_param_length_type_int' => 'Length',
'object_channelAdminLogEventActionChangeLocation' => 'Channel location changed',
'object_channelAdminLogEventActionChangeLocation_param_prev_value_type_ChannelLocation' => 'Previous value',
'object_channelAdminLogEventActionChangeLocation_param_new_value_type_ChannelLocation' => 'New value',
'object_channelLocationEmpty' => 'No physical location (normal chat/channel)',
'object_channelLocation' => 'Physical location (getchats)',
'object_channelLocation_param_geo_point_type_GeoPoint' => 'Geo point',
'object_channelLocation_param_address_type_string' => 'Physical address',
'object_peerLocated' => 'Located peer',
'object_peerLocated_param_peer_type_Peer' => 'Peer',
'object_peerLocated_param_expires_type_int' => 'Expiry date',
'object_peerLocated_param_distance_type_int' => 'Distance',
);
}

View File

@ -73,7 +73,7 @@ class MTProto extends AsyncConstruct implements TLCallback
/*
const V = 71;
*/
const V = 125;
const V = 126;
const RELEASE = '4.0';
const NOT_LOGGED_IN = 0;
const WAITING_CODE = 1;
@ -731,12 +731,12 @@ class MTProto extends AsyncConstruct implements TLCallback
'lang_pack' => $lang_pack,
], 'tl_schema' => [
// TL scheme files
'layer' => 100,
'layer' => 102,
// layer version
'src' => [
'mtproto' => __DIR__.'/TL_mtproto_v1.tl',
// mtproto TL scheme
'telegram' => __DIR__.'/TL_telegram_v100.tl',
'telegram' => __DIR__.'/TL_telegram_v102.tl',
// telegram TL scheme
'secret' => __DIR__.'/TL_secret.tl',
// secret chats TL scheme

View File

@ -407,6 +407,35 @@ trait BotAPI
$new_message .= "\n";
$offset++;
break;
case 's':
case 'strike':
case 'del':
$text = $this->html_entity_decode($node->textContent);
$length = $this->mb_strlen($text);
$entities[] = ['_' => 'messageEntityStrike', 'offset' => $offset, 'length' => $length];
$new_message .= $text;
$offset += $length;
break;
case 'u':
$text = $this->html_entity_decode($node->textContent);
$length = $this->mb_strlen($text);
$entities[] = ['_' => 'messageEntityUnderline', 'offset' => $offset, 'length' => $length];
$new_message .= $text;
$offset += $length;
break;
case 'blockquote':
$text = $this->html_entity_decode($node->textContent);
$length = $this->mb_strlen($text);
$entities[] = ['_' => 'messageEntityBlockquote', 'offset' => $offset, 'length' => $length];
$new_message .= $text;
$offset += $length;
break;
case 'b':
case 'strong':
$text = $this->html_entity_decode($node->textContent);
@ -659,7 +688,7 @@ trait BotAPI
public function html_fixtags($text)
{
$diff = 0;
preg_match_all('#(.*?)(<(a|b|\bstrong\b|\bem\b|i|\bcode\b|\bpre\b)[^>]*>)(.*?)(<\s*/\s*\3>)#is', $text, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
preg_match_all('#(.*?)(<(\bu\b|\bs\b|\ba\b|\bb\b|\bstrong\b|\bblockquote\b|\bstrike\b|\bdel\b|\bem\b|i|\bcode\b|\bpre\b)[^>]*>)(.*?)([<]\s*/\s*\3[>])#is', $text, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
if ($matches) {
foreach ($matches as $match) {
if (trim($match[1][0]) != '') {

File diff suppressed because it is too large Load Diff