Skip to content

Commit dcaf6a8

Browse files
committed
Update TDLib to 1.8.64
1 parent a383e05 commit dcaf6a8

69 files changed

Lines changed: 1963 additions & 103 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ All notable changes to this project will be documented in this file.
1111

1212
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1313

14+
## [Unreleased] (1.8.64)
15+
### Changed
16+
- Update to [TDLib v1.8.64](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.64).
17+
1418
## [1.8.63] - 2026-04-04
1519
### Changed
1620
- Update to [TDLib v1.8.63](https://github.com/ForNeVeR/tdlib-versioned/releases/tag/tdlib%2Fv1.8.63).

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT
66

77
<Project>
88
<PropertyGroup Label="Packaging">
9-
<Version>1.8.63</Version>
9+
<Version>1.8.64</Version>
1010
</PropertyGroup>
1111

1212
<PropertyGroup>

Scripts/Get-TlFiles.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: MIT
44

55
param(
6-
[string] $CommitHash = 'f06b0bac65278b03d26414c096080e7bfecfef52',
6+
[string] $CommitHash = '7f163d850abbebecf749e99fb412271cc1f4e805',
77
[string] $TdApiUrl = "https://github.com/tdlib/td/raw/$CommitHash/td/generate/scheme/td_api.tl",
88

99
[string] $SourceRoot = "$PSScriptRoot/..",

TdLib.Api/Functions/AddProfileAudio.cs

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,43 @@ public class AddProfileAudio : Function<Ok>
2828
public override string Extra { get; set; }
2929

3030
/// <summary>
31-
/// Identifier of the audio file to be added. The file must have been uploaded to the server
31+
/// The audio file to be added
3232
/// </summary>
3333
[JsonConverter(typeof(Converter))]
34-
[JsonProperty("file_id")]
35-
public int FileId { get; set; }
34+
[JsonProperty("audio")]
35+
public InputFile Audio { get; set; }
36+
37+
/// <summary>
38+
/// Duration of the audio, in seconds; may be replaced by the server; ignored for already uploaded files
39+
/// </summary>
40+
[JsonConverter(typeof(Converter))]
41+
[JsonProperty("duration")]
42+
public int Duration { get; set; }
43+
44+
/// <summary>
45+
/// Title of the audio; 0-64 characters; may be replaced by the server; ignored for already uploaded files
46+
/// </summary>
47+
[JsonConverter(typeof(Converter))]
48+
[JsonProperty("title")]
49+
public string Title { get; set; }
50+
51+
/// <summary>
52+
/// Performer of the audio; 0-64 characters, may be replaced by the server; ignored for already uploaded files
53+
/// </summary>
54+
[JsonConverter(typeof(Converter))]
55+
[JsonProperty("performer")]
56+
public string Performer { get; set; }
3657
}
3758

3859
/// <summary>
3960
/// Adds an audio file to the beginning of the profile audio files of the current user
4061
/// </summary>
4162
public static Task<Ok> AddProfileAudioAsync(
42-
this IClient client, int fileId = default)
63+
this IClient client, InputFile audio = default, int duration = default, string title = default, string performer = default)
4364
{
4465
return client.ExecuteAsync(new AddProfileAudio
4566
{
46-
FileId = fileId
67+
Audio = audio, Duration = duration, Title = title, Performer = performer
4768
});
4869
}
4970
}

TdLib.Api/Functions/AddProxy.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,24 @@ public class AddProxy : Function<AddedProxy>
4040
[JsonConverter(typeof(Converter))]
4141
[JsonProperty("enable")]
4242
public bool Enable { get; set; }
43+
44+
/// <summary>
45+
/// Comment to set for the proxy
46+
/// </summary>
47+
[JsonConverter(typeof(Converter))]
48+
[JsonProperty("comment")]
49+
public string Comment { get; set; }
4350
}
4451

4552
/// <summary>
4653
/// Adds a proxy server for network requests. Can be called before authorization
4754
/// </summary>
4855
public static Task<AddedProxy> AddProxyAsync(
49-
this IClient client, Proxy proxy = default, bool enable = default)
56+
this IClient client, Proxy proxy = default, bool enable = default, string comment = default)
5057
{
5158
return client.ExecuteAsync(new AddProxy
5259
{
53-
Proxy = proxy, Enable = enable
60+
Proxy = proxy, Enable = enable, Comment = comment
5461
});
5562
}
5663
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
using System;
2+
using System.Threading.Tasks;
3+
using Newtonsoft.Json;
4+
5+
// REUSE-IgnoreStart
6+
namespace TdLib
7+
{
8+
/// <summary>
9+
/// Autogenerated TDLib APIs
10+
/// </summary>
11+
public static partial class TdApi
12+
{
13+
/// <summary>
14+
/// Adds a custom text composition style to the list of used by the user styles. May return an error with a message "TONES_SAVED_TOO_MANY" if the maximum number of added custom styles has been reached
15+
/// </summary>
16+
public class AddTextCompositionStyle : Function<Ok>
17+
{
18+
/// <summary>
19+
/// Data type for serialization
20+
/// </summary>
21+
[JsonProperty("@type")]
22+
public override string DataType { get; set; } = "addTextCompositionStyle";
23+
24+
/// <summary>
25+
/// Extra data attached to the function
26+
/// </summary>
27+
[JsonProperty("@extra")]
28+
public override string Extra { get; set; }
29+
30+
/// <summary>
31+
/// Name of the style
32+
/// </summary>
33+
[JsonConverter(typeof(Converter))]
34+
[JsonProperty("name")]
35+
public string Name { get; set; }
36+
}
37+
38+
/// <summary>
39+
/// Adds a custom text composition style to the list of used by the user styles. May return an error with a message "TONES_SAVED_TOO_MANY" if the maximum number of added custom styles has been reached
40+
/// </summary>
41+
public static Task<Ok> AddTextCompositionStyleAsync(
42+
this IClient client, string name = default)
43+
{
44+
return client.ExecuteAsync(new AddTextCompositionStyle
45+
{
46+
Name = name
47+
});
48+
}
49+
}
50+
}
51+
// REUSE-IgnoreEnd
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
using System;
2+
using System.Threading.Tasks;
3+
using Newtonsoft.Json;
4+
5+
// REUSE-IgnoreStart
6+
namespace TdLib
7+
{
8+
/// <summary>
9+
/// Autogenerated TDLib APIs
10+
/// </summary>
11+
public static partial class TdApi
12+
{
13+
/// <summary>
14+
/// Sets the result of a guest query; for bots only
15+
/// </summary>
16+
public class AnswerGuestQuery : Function<InlineMessageId>
17+
{
18+
/// <summary>
19+
/// Data type for serialization
20+
/// </summary>
21+
[JsonProperty("@type")]
22+
public override string DataType { get; set; } = "answerGuestQuery";
23+
24+
/// <summary>
25+
/// Extra data attached to the function
26+
/// </summary>
27+
[JsonProperty("@extra")]
28+
public override string Extra { get; set; }
29+
30+
/// <summary>
31+
/// Identifier of the guest query
32+
/// </summary>
33+
[JsonConverter(typeof(Converter.Int64))]
34+
[JsonProperty("guest_query_id")]
35+
public long GuestQueryId { get; set; }
36+
37+
/// <summary>
38+
/// The result of the query
39+
/// </summary>
40+
[JsonConverter(typeof(Converter))]
41+
[JsonProperty("result")]
42+
public InputInlineQueryResult Result { get; set; }
43+
}
44+
45+
/// <summary>
46+
/// Sets the result of a guest query; for bots only
47+
/// </summary>
48+
public static Task<InlineMessageId> AnswerGuestQueryAsync(
49+
this IClient client, long guestQueryId = default, InputInlineQueryResult result = default)
50+
{
51+
return client.ExecuteAsync(new AnswerGuestQuery
52+
{
53+
GuestQueryId = guestQueryId, Result = result
54+
});
55+
}
56+
}
57+
}
58+
// REUSE-IgnoreEnd

TdLib.Api/Functions/AnswerWebAppQuery.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static partial class TdApi
1313
/// <summary>
1414
/// Sets the result of interaction with a Web App and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only
1515
/// </summary>
16-
public class AnswerWebAppQuery : Function<SentWebAppMessage>
16+
public class AnswerWebAppQuery : Function<InlineMessageId>
1717
{
1818
/// <summary>
1919
/// Data type for serialization
@@ -45,7 +45,7 @@ public class AnswerWebAppQuery : Function<SentWebAppMessage>
4545
/// <summary>
4646
/// Sets the result of interaction with a Web App and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only
4747
/// </summary>
48-
public static Task<SentWebAppMessage> AnswerWebAppQueryAsync(
48+
public static Task<InlineMessageId> AnswerWebAppQueryAsync(
4949
this IClient client, string webAppQueryId = default, InputInlineQueryResult result = default)
5050
{
5151
return client.ExecuteAsync(new AnswerWebAppQuery

TdLib.Api/Functions/CheckAuthenticationPremiumPurchase.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ public class CheckAuthenticationPremiumPurchase : Function<Ok>
2727
[JsonProperty("@extra")]
2828
public override string Extra { get; set; }
2929

30+
/// <summary>
31+
/// The number of days for which the Telegram Premium subscription will be granted
32+
/// </summary>
33+
[JsonConverter(typeof(Converter))]
34+
[JsonProperty("premium_day_count")]
35+
public int PremiumDayCount { get; set; }
36+
3037
/// <summary>
3138
/// ISO 4217 currency code of the payment currency
3239
/// </summary>
@@ -46,11 +53,11 @@ public class CheckAuthenticationPremiumPurchase : Function<Ok>
4653
/// Checks whether an in-store purchase of Telegram Premium is possible before authorization. Works only when the current authorization state is authorizationStateWaitPremiumPurchase
4754
/// </summary>
4855
public static Task<Ok> CheckAuthenticationPremiumPurchaseAsync(
49-
this IClient client, string currency = default, long amount = default)
56+
this IClient client, int premiumDayCount = default, string currency = default, long amount = default)
5057
{
5158
return client.ExecuteAsync(new CheckAuthenticationPremiumPurchase
5259
{
53-
Currency = currency, Amount = amount
60+
PremiumDayCount = premiumDayCount, Currency = currency, Amount = amount
5461
});
5562
}
5663
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
using System;
2+
using System.Threading.Tasks;
3+
using Newtonsoft.Json;
4+
5+
// REUSE-IgnoreStart
6+
namespace TdLib
7+
{
8+
/// <summary>
9+
/// Autogenerated TDLib APIs
10+
/// </summary>
11+
public static partial class TdApi
12+
{
13+
/// <summary>
14+
/// Creates a custom text composition style. May return an error with a message "TONES_SAVED_TOO_MANY" if the maximum number of added custom styles has been reached
15+
/// </summary>
16+
public class CreateTextCompositionStyle : Function<TextCompositionStyle>
17+
{
18+
/// <summary>
19+
/// Data type for serialization
20+
/// </summary>
21+
[JsonProperty("@type")]
22+
public override string DataType { get; set; } = "createTextCompositionStyle";
23+
24+
/// <summary>
25+
/// Extra data attached to the function
26+
/// </summary>
27+
[JsonProperty("@extra")]
28+
public override string Extra { get; set; }
29+
30+
/// <summary>
31+
/// Title of the style; 1-getOption("text_composition_style_title_length_max") characters
32+
/// </summary>
33+
[JsonConverter(typeof(Converter))]
34+
[JsonProperty("title")]
35+
public string Title { get; set; }
36+
37+
/// <summary>
38+
/// Identifier of the custom emoji corresponding to the style
39+
/// </summary>
40+
[JsonConverter(typeof(Converter.Int64))]
41+
[JsonProperty("custom_emoji_id")]
42+
public long CustomEmojiId { get; set; }
43+
44+
/// <summary>
45+
/// Prompt that will be used for text composition; 1-getOption("text_composition_style_prompt_length_max") characters
46+
/// </summary>
47+
[JsonConverter(typeof(Converter))]
48+
[JsonProperty("prompt")]
49+
public string Prompt { get; set; }
50+
51+
/// <summary>
52+
/// Pass true if the current user must be shown as the creator of the style
53+
/// </summary>
54+
[JsonConverter(typeof(Converter))]
55+
[JsonProperty("show_creator")]
56+
public bool ShowCreator { get; set; }
57+
}
58+
59+
/// <summary>
60+
/// Creates a custom text composition style. May return an error with a message "TONES_SAVED_TOO_MANY" if the maximum number of added custom styles has been reached
61+
/// </summary>
62+
public static Task<TextCompositionStyle> CreateTextCompositionStyleAsync(
63+
this IClient client, string title = default, long customEmojiId = default, string prompt = default, bool showCreator = default)
64+
{
65+
return client.ExecuteAsync(new CreateTextCompositionStyle
66+
{
67+
Title = title, CustomEmojiId = customEmojiId, Prompt = prompt, ShowCreator = showCreator
68+
});
69+
}
70+
}
71+
}
72+
// REUSE-IgnoreEnd

0 commit comments

Comments
 (0)