Skip to content

Commit f359033

Browse files
committed
Update to Telegram API Layer 228.2
added missing Ephemeral_EditMessage, UpdateEphemeralBotCallbackQuery for bots
1 parent e9729f4 commit f359033

6 files changed

Lines changed: 51 additions & 4 deletions

File tree

.github/workflows/dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
RELEASE_NOTES=${RELEASE_NOTES//;/%3B}
5050
dotnet pack $PROJECT_PATH --configuration $CONFIGURATION -p:Version=$VERSION -p:ReleaseNotes="$RELEASE_NOTES" --output $PACKAGES_PATH
5151
# - name: Upload artifact
52-
# uses: actions/upload-artifact@v5
52+
# uses: actions/upload-artifact@v6
5353
# with:
5454
# name: packages
5555
# path: $PACKAGES_PATH/*.nupkg

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
RELEASE_NOTES=${RELEASE_NOTES//;/%3B}
5757
dotnet pack $PROJECT_PATH --configuration $CONFIGURATION -p:Version=$VERSION -p:ReleaseNotes="$RELEASE_NOTES" --output $PACKAGES_PATH
5858
# - name: Upload artifact
59-
# uses: actions/upload-artifact@v5
59+
# uses: actions/upload-artifact@v6
6060
# with:
6161
# name: packages
6262
# path: $PACKAGES_PATH/*.nupkg

EXAMPLES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ that simplifies the download of a photo/document/file once you get a reference t
210210

211211
See [Examples/Program_DownloadSavedMedia.cs](https://github.com/wiz0u/WTelegramClient/blob/master/Examples/Program_DownloadSavedMedia.cs?ts=4#L28) that download all media files you forward to yourself (Saved Messages)
212212

213-
_Note: To abort an ongoing download, you can throw an exception via the `progress` callback argument. Example: `(t,s) => ct.ThrowIfCancellationRequested()`_
213+
_Note: To abort an ongoing download (or upload), you can throw an exception via the `progress` callback argument. Example: `(t,s) => ct.ThrowIfCancellationRequested()`_
214214

215215
<a name="upload"></a>
216216
## Upload a media file and post it with caption to a chat

src/TL.Schema.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6817,6 +6817,17 @@ public sealed partial class UpdateEditEphemeralMessage : Update
68176817
{
68186818
public EphemeralMessage message;
68196819
}
6820+
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/updateEphemeralBotCallbackQuery"/></para></summary>
6821+
[TLDef(0x9B380762)]
6822+
public sealed partial class UpdateEphemeralBotCallbackQuery : Update
6823+
{
6824+
public long query_id;
6825+
public long user_id;
6826+
public Peer peer;
6827+
public int msg_id;
6828+
public byte[] data;
6829+
public EphemeralMessage message;
6830+
}
68206831
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/updateBotStarsSubscription"/></para></summary>
68216832
[TLDef(0x6C0D8E23)]
68226833
public sealed partial class UpdateBotStarsSubscription : Update

src/TL.SchemaFuncs.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8946,6 +8946,20 @@ public static Task<Messages_BotCallbackAnswer> Ephemeral_GetCallbackAnswer(this
89468946
id = id,
89478947
data = data,
89488948
});
8949+
8950+
/// <summary><para>See <a href="https://corefork.telegram.org/method/ephemeral.editMessage"/></para></summary>
8951+
public static Task<UpdatesBase> Ephemeral_EditMessage(this Client client, InputPeer peer, InputUserBase receiver_id, int id, string message = null, MessageEntity[] entities = null, ReplyMarkup reply_markup = null, InputMedia media = null)
8952+
=> client.Invoke(new Ephemeral_EditMessage
8953+
{
8954+
flags = (Ephemeral_EditMessage.Flags)((message != null ? 0x1 : 0) | (entities != null ? 0x2 : 0) | (reply_markup != null ? 0x4 : 0) | (media != null ? 0x8 : 0)),
8955+
peer = peer,
8956+
receiver_id = receiver_id,
8957+
id = id,
8958+
message = message,
8959+
media = media,
8960+
entities = entities,
8961+
reply_markup = reply_markup,
8962+
});
89498963
}
89508964
}
89518965

@@ -16502,4 +16516,25 @@ public sealed partial class Ephemeral_GetCallbackAnswer : IMethod<Messages_BotCa
1650216516
has_data = 0x2,
1650316517
}
1650416518
}
16519+
16520+
[TLDef(0x13F250EE)]
16521+
public sealed partial class Ephemeral_EditMessage : IMethod<UpdatesBase>
16522+
{
16523+
public Flags flags;
16524+
public InputPeer peer;
16525+
public InputUserBase receiver_id;
16526+
public int id;
16527+
[IfFlag(0)] public string message;
16528+
[IfFlag(3)] public InputMedia media;
16529+
[IfFlag(1)] public MessageEntity[] entities;
16530+
[IfFlag(2)] public ReplyMarkup reply_markup;
16531+
16532+
[Flags] public enum Flags : uint
16533+
{
16534+
has_message = 0x1,
16535+
has_entities = 0x2,
16536+
has_reply_markup = 0x4,
16537+
has_media = 0x8,
16538+
}
16539+
}
1650516540
}

src/TL.Table.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace TL
66
{
77
public static partial class Layer
88
{
9-
public const int Version = 228; // fetched 07/11/2026 00:09:47
9+
public const int Version = 228; // fetched 08/04/2026 23:17:51
1010
internal const int SecretChats = 144;
1111
internal const int MTProto2 = 73;
1212
internal const uint VectorCtor = 0x1CB5C415;
@@ -476,6 +476,7 @@ public static partial class Layer
476476
[0x20BCBBA1] = typeof(UpdateNewEphemeralMessage),
477477
[0x56DBFCF8] = typeof(UpdateDeleteEphemeralMessages),
478478
[0x4BBB8F01] = typeof(UpdateEditEphemeralMessage),
479+
[0x9B380762] = typeof(UpdateEphemeralBotCallbackQuery),
479480
[0x6C0D8E23] = typeof(UpdateBotStarsSubscription),
480481
[0xA56C2A3E] = typeof(Updates_State),
481482
[0x5D75A138] = typeof(Updates_DifferenceEmpty),

0 commit comments

Comments
 (0)