From 6fb59286bde7fc8641c93f31ea01bf32c87db2fd Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Thu, 1 May 2025 12:17:06 +0200
Subject: [PATCH] API Layer 202: E2E group calls
https://core.telegram.org/api/end-to-end/group-calls
---
README.md | 2 +-
src/TL.Schema.cs | 117 ++++++++++++---------
src/TL.SchemaFuncs.cs | 210 ++++++++++++++++++++++++++++---------
src/TL.Table.cs | 20 ++--
src/WTelegramClient.csproj | 2 +-
5 files changed, 242 insertions(+), 109 deletions(-)
diff --git a/README.md b/README.md
index 32a183d..d2aadf3 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[](https://corefork.telegram.org/methods)
+[](https://corefork.telegram.org/methods)
[](https://www.nuget.org/packages/WTelegramClient/)
[](https://www.nuget.org/packages/WTelegramClient/absoluteLatest)
[](https://buymeacoffee.com/wizou)
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 424006f..58a7de8 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -692,7 +692,7 @@ namespace TL
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// Livestream info
- public InputGroupCall call;
+ public InputGroupCallBase call;
/// Timestamp in milliseconds
public long time_ms;
/// Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale
@@ -1262,7 +1262,7 @@ namespace TL
/// Peer folder ID, for more info click here
public virtual int Folder => default;
/// Group call information
- public virtual InputGroupCall Call => default;
+ public virtual InputGroupCallBase Call => default;
/// Time-To-Live of messages sent by the current user to this chat
public virtual int TtlPeriod => default;
/// When using Phone_GetGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default.
@@ -1303,7 +1303,7 @@ namespace TL
/// Peer folder ID, for more info click here
[IfFlag(11)] public int folder_id;
/// Group call information
- [IfFlag(12)] public InputGroupCall call;
+ [IfFlag(12)] public InputGroupCallBase call;
/// Time-To-Live of messages sent by the current user to this chat
[IfFlag(14)] public int ttl_period;
/// When using Phone_GetGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default.
@@ -1370,7 +1370,7 @@ namespace TL
/// Peer folder ID, for more info click here
public override int Folder => folder_id;
/// Group call information
- public override InputGroupCall Call => call;
+ public override InputGroupCallBase Call => call;
/// Time-To-Live of messages sent by the current user to this chat
public override int TtlPeriod => ttl_period;
/// When using Phone_GetGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default.
@@ -1447,7 +1447,7 @@ namespace TL
/// Latest PTS for this channel
public int pts;
/// Livestream or group call information
- [IfFlag(21)] public InputGroupCall call;
+ [IfFlag(21)] public InputGroupCallBase call;
/// Time-To-Live of messages in this channel or supergroup
[IfFlag(24)] public int ttl_period;
/// A list of suggested actions for the supergroup admin, see here for more info ».
@@ -1606,7 +1606,7 @@ namespace TL
/// Peer folder ID, for more info click here
public override int Folder => folder_id;
/// Livestream or group call information
- public override InputGroupCall Call => call;
+ public override InputGroupCallBase Call => call;
/// Time-To-Live of messages in this channel or supergroup
public override int TtlPeriod => ttl_period;
/// When using Phone_GetGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default.
@@ -2548,7 +2548,7 @@ namespace TL
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// Group call
- public InputGroupCall call;
+ public InputGroupCallBase call;
/// Group call duration
[IfFlag(0)] public int duration;
@@ -2563,7 +2563,7 @@ namespace TL
public sealed partial class MessageActionInviteToGroupCall : MessageAction
{
/// The group call
- public InputGroupCall call;
+ public InputGroupCallBase call;
/// The invited users
public long[] users;
}
@@ -2589,7 +2589,7 @@ namespace TL
public sealed partial class MessageActionGroupCallScheduled : MessageAction
{
/// The group call
- public InputGroupCall call;
+ public InputGroupCallBase call;
/// When is this group call scheduled to start
public DateTime schedule_date;
}
@@ -2959,6 +2959,24 @@ namespace TL
{
public long stars;
}
+ /// See
+ [TLDef(0x2FFE2F7A)]
+ public sealed partial class MessageActionConferenceCall : MessageAction
+ {
+ public Flags flags;
+ public long call_id;
+ [IfFlag(2)] public int duration;
+ [IfFlag(3)] public Peer[] other_participants;
+
+ [Flags] public enum Flags : uint
+ {
+ missed = 0x1,
+ active = 0x2,
+ has_duration = 0x4,
+ has_other_participants = 0x8,
+ video = 0x10,
+ }
+ }
/// Chat info. See Derived classes: ,
public abstract partial class DialogBase : IObject
@@ -5124,7 +5142,7 @@ namespace TL
public sealed partial class UpdateGroupCallParticipants : Update
{
/// Group call
- public InputGroupCall call;
+ public InputGroupCallBase call;
/// New participant list
public GroupCallParticipant[] participants;
/// Version
@@ -5818,6 +5836,15 @@ namespace TL
{
public Auth_SentCodeBase sent_code;
}
+ /// See
+ [TLDef(0xA477288F)]
+ public sealed partial class UpdateGroupCallChainBlocks : Update
+ {
+ public InputGroupCallBase call;
+ public int sub_chain_id;
+ public byte[][] blocks;
+ public int next_offset;
+ }
/// Updates state. See
[TLDef(0xA56C2A3E)]
@@ -10529,11 +10556,11 @@ namespace TL
/// The phone call was discarded because the user is busy in another call See
[TLDef(0xFAF7E8C9)]
public sealed partial class PhoneCallDiscardReasonBusy : PhoneCallDiscardReason { }
- /// See
- [TLDef(0xAFE2B839)]
- public sealed partial class PhoneCallDiscardReasonAllowGroupCall : PhoneCallDiscardReason
+ /// See
+ [TLDef(0x9FBBF1F7)]
+ public sealed partial class PhoneCallDiscardReasonMigrateConferenceCall : PhoneCallDiscardReason
{
- public byte[] encrypted_key;
+ public string slug;
}
/// Represents a json-encoded object See
@@ -11232,7 +11259,6 @@ namespace TL
public virtual long ParticipantId => default;
/// Phone call protocol info
public virtual PhoneCallProtocol Protocol => default;
- public virtual InputGroupCall ConferenceCall => default;
}
/// Empty constructor See
[TLDef(0x5366C915)]
@@ -11245,7 +11271,7 @@ namespace TL
public override long ID => id;
}
/// Incoming phone call See
- [TLDef(0xEED42858)]
+ [TLDef(0xC5226F17)]
public sealed partial class PhoneCallWaiting : PhoneCallBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -11264,7 +11290,6 @@ namespace TL
public PhoneCallProtocol protocol;
/// When was the phone call received
[IfFlag(0)] public DateTime receive_date;
- [IfFlag(8)] public InputGroupCall conference_call;
[Flags] public enum Flags : uint
{
@@ -11272,8 +11297,6 @@ namespace TL
has_receive_date = 0x1,
/// Is this a video call
video = 0x40,
- /// Field has a value
- has_conference_call = 0x100,
}
/// Call ID
@@ -11288,10 +11311,9 @@ namespace TL
public override long ParticipantId => participant_id;
/// Phone call protocol info
public override PhoneCallProtocol Protocol => protocol;
- public override InputGroupCall ConferenceCall => conference_call;
}
/// Requested phone call See
- [TLDef(0x45361C63)]
+ [TLDef(0x14B0ED0C)]
public sealed partial class PhoneCallRequested : PhoneCallBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -11310,14 +11332,11 @@ namespace TL
public byte[] g_a_hash;
/// Call protocol info to be passed to libtgvoip
public PhoneCallProtocol protocol;
- [IfFlag(8)] public InputGroupCall conference_call;
[Flags] public enum Flags : uint
{
/// Whether this is a video call
video = 0x40,
- /// Field has a value
- has_conference_call = 0x100,
}
/// Phone call ID
@@ -11332,10 +11351,9 @@ namespace TL
public override long ParticipantId => participant_id;
/// Call protocol info to be passed to libtgvoip
public override PhoneCallProtocol Protocol => protocol;
- public override InputGroupCall ConferenceCall => conference_call;
}
/// An accepted phone call See
- [TLDef(0x22FD7181)]
+ [TLDef(0x3660C311)]
public sealed partial class PhoneCallAccepted : PhoneCallBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -11354,14 +11372,11 @@ namespace TL
public byte[] g_b;
/// Protocol to use for phone call
public PhoneCallProtocol protocol;
- [IfFlag(8)] public InputGroupCall conference_call;
[Flags] public enum Flags : uint
{
/// Whether this is a video call
video = 0x40,
- /// Field has a value
- has_conference_call = 0x100,
}
/// ID of accepted phone call
@@ -11376,10 +11391,9 @@ namespace TL
public override long ParticipantId => participant_id;
/// Protocol to use for phone call
public override PhoneCallProtocol Protocol => protocol;
- public override InputGroupCall ConferenceCall => conference_call;
}
/// Phone call See
- [TLDef(0x3BA5940C)]
+ [TLDef(0x30535AF5)]
public sealed partial class PhoneCall : PhoneCallBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -11406,7 +11420,6 @@ namespace TL
public DateTime start_date;
/// Custom JSON-encoded call parameters to be passed to tgcalls.
[IfFlag(7)] public DataJSON custom_parameters;
- [IfFlag(8)] public InputGroupCall conference_call;
[Flags] public enum Flags : uint
{
@@ -11416,8 +11429,7 @@ namespace TL
video = 0x40,
/// Field has a value
has_custom_parameters = 0x80,
- /// Field has a value
- has_conference_call = 0x100,
+ conference_supported = 0x100,
}
/// Call ID
@@ -11432,10 +11444,9 @@ namespace TL
public override long ParticipantId => participant_id;
/// Call protocol info to be passed to libtgvoip
public override PhoneCallProtocol Protocol => protocol;
- public override InputGroupCall ConferenceCall => conference_call;
}
/// Indicates a discarded phone call See
- [TLDef(0xF9D25503)]
+ [TLDef(0x50CA4DE1)]
public sealed partial class PhoneCallDiscarded : PhoneCallBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -11446,7 +11457,6 @@ namespace TL
[IfFlag(0)] public PhoneCallDiscardReason reason;
/// Duration of the phone call in seconds
[IfFlag(1)] public int duration;
- [IfFlag(8)] public InputGroupCall conference_call;
[Flags] public enum Flags : uint
{
@@ -11460,13 +11470,10 @@ namespace TL
need_debug = 0x8,
/// Whether the call was a video call
video = 0x40,
- /// Field has a value
- has_conference_call = 0x100,
}
/// Call ID
public override long ID => id;
- public override InputGroupCall ConferenceCall => conference_call;
}
/// Phone call connection See Derived classes: ,
@@ -11904,14 +11911,14 @@ namespace TL
public sealed partial class ChannelAdminLogEventActionStartGroupCall : ChannelAdminLogEventAction
{
/// Group call
- public InputGroupCall call;
+ public InputGroupCallBase call;
}
/// A group call was terminated See
[TLDef(0xDB9F9140)]
public sealed partial class ChannelAdminLogEventActionDiscardGroupCall : ChannelAdminLogEventAction
{
/// The group call that was terminated
- public InputGroupCall call;
+ public InputGroupCallBase call;
}
/// A group call participant was muted See
[TLDef(0xF92424D2)]
@@ -14809,7 +14816,7 @@ namespace TL
public override long AccessHash => access_hash;
}
/// Info about a group call or livestream See
- [TLDef(0xCDF8D3E3)]
+ [TLDef(0x553B0BA1)]
public sealed partial class GroupCall : GroupCallBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -14834,7 +14841,7 @@ namespace TL
public int unmuted_video_limit;
/// Version
public int version;
- [IfFlag(14)] public long conference_from_call;
+ [IfFlag(16)] public string invite_link;
[Flags] public enum Flags : uint
{
@@ -14864,8 +14871,10 @@ namespace TL
rtmp_stream = 0x1000,
/// Whether the listeners list is hidden and cannot be fetched using Phone_GetGroupParticipants. The phone.groupParticipants.count and groupCall.participants_count counters will still include listeners.
listeners_hidden = 0x2000,
- /// Field has a value
- has_conference_from_call = 0x4000,
+ conference = 0x4000,
+ creator = 0x8000,
+ /// Field has a value
+ has_invite_link = 0x10000,
}
/// Group call ID
@@ -14874,15 +14883,29 @@ namespace TL
public override long AccessHash => access_hash;
}
+ /// Indicates a group call See Derived classes:
+ public abstract partial class InputGroupCallBase : IObject { }
/// Points to a specific group call See
[TLDef(0xD8AA840F)]
- public sealed partial class InputGroupCall : IObject
+ public sealed partial class InputGroupCall : InputGroupCallBase
{
/// Group call ID
public long id;
/// ⚠ REQUIRED FIELD. See how to obtain it
Group call access hash
public long access_hash;
}
+ /// See
+ [TLDef(0xFE06823F)]
+ public sealed partial class InputGroupCallSlug : InputGroupCallBase
+ {
+ public string slug;
+ }
+ /// See
+ [TLDef(0x8C10603F)]
+ public sealed partial class InputGroupCallInviteMessage : InputGroupCallBase
+ {
+ public int msg_id;
+ }
/// Info about a group call participant See
[TLDef(0xEBA636FE)]
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index aa0b3db..9a50d76 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -6509,12 +6509,11 @@ namespace TL
/// Random ID to avoid resending the same object
/// Parameter for E2E encryption key exchange »
/// Phone call settings
- public static Task Phone_RequestCall(this Client client, InputUserBase user_id, int random_id, byte[] g_a_hash, PhoneCallProtocol protocol, InputGroupCall conference_call = null, bool video = false)
+ public static Task Phone_RequestCall(this Client client, InputUserBase user_id, int random_id, byte[] g_a_hash, PhoneCallProtocol protocol, bool video = false)
=> client.Invoke(new Phone_RequestCall
{
- flags = (Phone_RequestCall.Flags)((conference_call != null ? 0x2 : 0) | (video ? 0x1 : 0)),
+ flags = (Phone_RequestCall.Flags)(video ? 0x1 : 0),
user_id = user_id,
- conference_call = conference_call,
random_id = random_id,
g_a_hash = g_a_hash,
protocol = protocol,
@@ -6627,21 +6626,22 @@ namespace TL
/// Join the group call, presenting yourself as the specified user/channel
/// The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat.
/// WebRTC parameters
- public static Task Phone_JoinGroupCall(this Client client, InputGroupCall call, InputPeer join_as, DataJSON params_, string invite_hash = null, long? key_fingerprint = null, bool muted = false, bool video_stopped = false)
+ public static Task Phone_JoinGroupCall(this Client client, InputGroupCallBase call, InputPeer join_as, DataJSON params_, string invite_hash = null, Int256? public_key = null, byte[] block = null, bool muted = false, bool video_stopped = false)
=> client.Invoke(new Phone_JoinGroupCall
{
- flags = (Phone_JoinGroupCall.Flags)((invite_hash != null ? 0x2 : 0) | (key_fingerprint != null ? 0x8 : 0) | (muted ? 0x1 : 0) | (video_stopped ? 0x4 : 0)),
+ flags = (Phone_JoinGroupCall.Flags)((invite_hash != null ? 0x2 : 0) | (public_key != null ? 0x8 : 0) | (block != null ? 0x8 : 0) | (muted ? 0x1 : 0) | (video_stopped ? 0x4 : 0)),
call = call,
join_as = join_as,
invite_hash = invite_hash,
- key_fingerprint = key_fingerprint ?? default,
+ public_key = public_key ?? default,
+ block = block,
params_ = params_,
});
/// Leave a group call See Possible codes: 400 (details)
/// The group call
/// Your source ID
- public static Task Phone_LeaveGroupCall(this Client client, InputGroupCall call, int source)
+ public static Task Phone_LeaveGroupCall(this Client client, InputGroupCallBase call, int source)
=> client.Invoke(new Phone_LeaveGroupCall
{
call = call,
@@ -6651,7 +6651,7 @@ namespace TL
/// Invite a set of users to a group call. See Possible codes: 400,403 (details)
/// The group call
/// The users to invite.
- public static Task Phone_InviteToGroupCall(this Client client, InputGroupCall call, params InputUserBase[] users)
+ public static Task Phone_InviteToGroupCall(this Client client, InputGroupCallBase call, params InputUserBase[] users)
=> client.Invoke(new Phone_InviteToGroupCall
{
call = call,
@@ -6660,7 +6660,7 @@ namespace TL
/// Terminate a group call See Possible codes: 400,403 (details)
/// The group call to terminate
- public static Task Phone_DiscardGroupCall(this Client client, InputGroupCall call)
+ public static Task Phone_DiscardGroupCall(this Client client, InputGroupCallBase call)
=> client.Invoke(new Phone_DiscardGroupCall
{
call = call,
@@ -6670,7 +6670,7 @@ namespace TL
/// Invalidate existing invite links
/// Group call
/// Whether all users will that join this group call are muted by default upon joining the group call
- public static Task Phone_ToggleGroupCallSettings(this Client client, InputGroupCall call, bool? join_muted = default, bool reset_invite_hash = false)
+ public static Task Phone_ToggleGroupCallSettings(this Client client, InputGroupCallBase call, bool? join_muted = default, bool reset_invite_hash = false)
=> client.Invoke(new Phone_ToggleGroupCallSettings
{
flags = (Phone_ToggleGroupCallSettings.Flags)((join_muted != default ? 0x1 : 0) | (reset_invite_hash ? 0x2 : 0)),
@@ -6681,7 +6681,7 @@ namespace TL
/// Get info about a group call See Possible codes: 400,403 (details)
/// The group call
/// Maximum number of results to return, see pagination
- public static Task Phone_GetGroupCall(this Client client, InputGroupCall call, int limit = int.MaxValue)
+ public static Task Phone_GetGroupCall(this Client client, InputGroupCallBase call, int limit = int.MaxValue)
=> client.Invoke(new Phone_GetGroupCall
{
call = call,
@@ -6694,7 +6694,7 @@ namespace TL
/// If specified, will fetch group participant info about the specified WebRTC source IDs
/// Offset for results, taken from the next_offset field of , initially an empty string.
Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in if it is empty, to avoid an infinite loop.
/// Maximum number of results to return, see pagination
- public static Task Phone_GetGroupParticipants(this Client client, InputGroupCall call, InputPeer[] ids, int[] sources, string offset, int limit = int.MaxValue)
+ public static Task Phone_GetGroupParticipants(this Client client, InputGroupCallBase call, InputPeer[] ids, int[] sources, string offset, int limit = int.MaxValue)
=> client.Invoke(new Phone_GetGroupParticipants
{
call = call,
@@ -6707,7 +6707,7 @@ namespace TL
/// Check whether the group call Server Forwarding Unit is currently receiving the streams with the specified WebRTC source IDs.
Returns an intersection of the source IDs specified in sources, and the source IDs currently being forwarded by the SFU. See Possible codes: 400 (details)
/// Group call
/// Source IDs
- public static Task Phone_CheckGroupCall(this Client client, InputGroupCall call, params int[] sources)
+ public static Task Phone_CheckGroupCall(this Client client, InputGroupCallBase call, params int[] sources)
=> client.Invoke(new Phone_CheckGroupCall
{
call = call,
@@ -6720,7 +6720,7 @@ namespace TL
/// The group call or livestream
/// Recording title
/// If video stream recording is enabled, whether to record in portrait or landscape mode
- public static Task Phone_ToggleGroupCallRecord(this Client client, InputGroupCall call, string title = null, bool? video_portrait = default, bool start = false, bool video = false)
+ public static Task Phone_ToggleGroupCallRecord(this Client client, InputGroupCallBase call, string title = null, bool? video_portrait = default, bool start = false, bool video = false)
=> client.Invoke(new Phone_ToggleGroupCallRecord
{
flags = (Phone_ToggleGroupCallRecord.Flags)((title != null ? 0x2 : 0) | (video_portrait != default ? 0x4 : 0) | (start ? 0x1 : 0) | (video ? 0x4 : 0)),
@@ -6738,7 +6738,7 @@ namespace TL
/// Start or stop the video stream
/// Pause or resume the video stream
/// Pause or resume the screen sharing stream
- public static Task Phone_EditGroupCallParticipant(this Client client, InputGroupCall call, InputPeer participant, bool? muted = default, int? volume = null, bool? raise_hand = default, bool? video_stopped = default, bool? video_paused = default, bool? presentation_paused = default)
+ public static Task Phone_EditGroupCallParticipant(this Client client, InputGroupCallBase call, InputPeer participant, bool? muted = default, int? volume = null, bool? raise_hand = default, bool? video_stopped = default, bool? video_paused = default, bool? presentation_paused = default)
=> client.Invoke(new Phone_EditGroupCallParticipant
{
flags = (Phone_EditGroupCallParticipant.Flags)((muted != default ? 0x1 : 0) | (volume != null ? 0x2 : 0) | (raise_hand != default ? 0x4 : 0) | (video_stopped != default ? 0x8 : 0) | (video_paused != default ? 0x10 : 0) | (presentation_paused != default ? 0x20 : 0)),
@@ -6755,7 +6755,7 @@ namespace TL
/// Edit the title of a group call or livestream See Possible codes: 400,403 (details)
/// Group call
/// New title
- public static Task Phone_EditGroupCallTitle(this Client client, InputGroupCall call, string title)
+ public static Task Phone_EditGroupCallTitle(this Client client, InputGroupCallBase call, string title)
=> client.Invoke(new Phone_EditGroupCallTitle
{
call = call,
@@ -6773,7 +6773,7 @@ namespace TL
/// Get an invite link for a group call or livestream See Possible codes: 400,403 (details)
/// For livestreams or muted group chats, if set, users that join using this link will be able to speak without explicitly requesting permission by (for example by raising their hand).
/// The group call
- public static Task Phone_ExportGroupCallInvite(this Client client, InputGroupCall call, bool can_self_unmute = false)
+ public static Task Phone_ExportGroupCallInvite(this Client client, InputGroupCallBase call, bool can_self_unmute = false)
=> client.Invoke(new Phone_ExportGroupCallInvite
{
flags = (Phone_ExportGroupCallInvite.Flags)(can_self_unmute ? 0x1 : 0),
@@ -6783,7 +6783,7 @@ namespace TL
/// Subscribe or unsubscribe to a scheduled group call See Possible codes: 400,403 (details)
/// Scheduled group call
/// Enable or disable subscription
- public static Task Phone_ToggleGroupCallStartSubscription(this Client client, InputGroupCall call, bool subscribed)
+ public static Task Phone_ToggleGroupCallStartSubscription(this Client client, InputGroupCallBase call, bool subscribed)
=> client.Invoke(new Phone_ToggleGroupCallStartSubscription
{
call = call,
@@ -6792,7 +6792,7 @@ namespace TL
/// Start a scheduled group call. See Possible codes: 400,403 (details)
/// The scheduled group call
- public static Task Phone_StartScheduledGroupCall(this Client client, InputGroupCall call)
+ public static Task Phone_StartScheduledGroupCall(this Client client, InputGroupCallBase call)
=> client.Invoke(new Phone_StartScheduledGroupCall
{
call = call,
@@ -6811,7 +6811,7 @@ namespace TL
/// Start screen sharing in a call See Possible codes: 400,403 (details)
/// The group call
/// WebRTC parameters
- public static Task Phone_JoinGroupCallPresentation(this Client client, InputGroupCall call, DataJSON params_)
+ public static Task Phone_JoinGroupCallPresentation(this Client client, InputGroupCallBase call, DataJSON params_)
=> client.Invoke(new Phone_JoinGroupCallPresentation
{
call = call,
@@ -6820,7 +6820,7 @@ namespace TL
/// Stop screen sharing in a group call See Possible codes: 400 (details)
/// The group call
- public static Task Phone_LeaveGroupCallPresentation(this Client client, InputGroupCall call)
+ public static Task Phone_LeaveGroupCallPresentation(this Client client, InputGroupCallBase call)
=> client.Invoke(new Phone_LeaveGroupCallPresentation
{
call = call,
@@ -6828,7 +6828,7 @@ namespace TL
/// Get info about RTMP streams in a group call or livestream.
This method should be invoked to the same group/channel-related DC used for downloading livestream chunks.
As usual, the media DC is preferred, if available. See Possible codes: 400 (details)
/// Group call or livestream
- public static Task Phone_GetGroupCallStreamChannels(this Client client, InputGroupCall call)
+ public static Task Phone_GetGroupCallStreamChannels(this Client client, InputGroupCallBase call)
=> client.Invoke(new Phone_GetGroupCallStreamChannels
{
call = call,
@@ -6855,11 +6855,58 @@ namespace TL
});
/// See
- public static Task Phone_CreateConferenceCall(this Client client, InputPhoneCall peer, long key_fingerprint)
+ public static Task Phone_CreateConferenceCall(this Client client, int random_id, Int256? public_key = null, byte[] block = null, DataJSON params_ = null, bool muted = false, bool video_stopped = false, bool join = false)
=> client.Invoke(new Phone_CreateConferenceCall
{
- peer = peer,
- key_fingerprint = key_fingerprint,
+ flags = (Phone_CreateConferenceCall.Flags)((public_key != null ? 0x8 : 0) | (block != null ? 0x8 : 0) | (params_ != null ? 0x8 : 0) | (muted ? 0x1 : 0) | (video_stopped ? 0x4 : 0) | (join ? 0x8 : 0)),
+ random_id = random_id,
+ public_key = public_key ?? default,
+ block = block,
+ params_ = params_,
+ });
+
+ /// See
+ public static Task Phone_DeleteConferenceCallParticipants(this Client client, InputGroupCallBase call, long[] ids, byte[] block, bool only_left = false, bool kick = false)
+ => client.Invoke(new Phone_DeleteConferenceCallParticipants
+ {
+ flags = (Phone_DeleteConferenceCallParticipants.Flags)((only_left ? 0x1 : 0) | (kick ? 0x2 : 0)),
+ call = call,
+ ids = ids,
+ block = block,
+ });
+
+ /// See
+ public static Task Phone_SendConferenceCallBroadcast(this Client client, InputGroupCallBase call, byte[] block)
+ => client.Invoke(new Phone_SendConferenceCallBroadcast
+ {
+ call = call,
+ block = block,
+ });
+
+ /// See
+ public static Task Phone_InviteConferenceCallParticipant(this Client client, InputGroupCallBase call, InputUserBase user_id, bool video = false)
+ => client.Invoke(new Phone_InviteConferenceCallParticipant
+ {
+ flags = (Phone_InviteConferenceCallParticipant.Flags)(video ? 0x1 : 0),
+ call = call,
+ user_id = user_id,
+ });
+
+ /// See
+ public static Task Phone_DeclineConferenceCallInvite(this Client client, int msg_id)
+ => client.Invoke(new Phone_DeclineConferenceCallInvite
+ {
+ msg_id = msg_id,
+ });
+
+ /// See
+ public static Task Phone_GetGroupCallChainBlocks(this Client client, InputGroupCallBase call, int sub_chain_id, int offset = default, int limit = int.MaxValue)
+ => client.Invoke(new Phone_GetGroupCallChainBlocks
+ {
+ call = call,
+ sub_chain_id = sub_chain_id,
+ offset = offset,
+ limit = limit,
});
/// Get localization pack strings See Possible codes: 400 (details)
@@ -12964,12 +13011,11 @@ namespace TL.Methods
[TLDef(0x55451FA9)]
public sealed partial class Phone_GetCallConfig : IMethod { }
- [TLDef(0xA6C4600C)]
+ [TLDef(0x42FF96ED)]
public sealed partial class Phone_RequestCall : IMethod
{
public Flags flags;
public InputUserBase user_id;
- [IfFlag(1)] public InputGroupCall conference_call;
public int random_id;
public byte[] g_a_hash;
public PhoneCallProtocol protocol;
@@ -12977,7 +13023,6 @@ namespace TL.Methods
[Flags] public enum Flags : uint
{
video = 0x1,
- has_conference_call = 0x2,
}
}
@@ -13064,14 +13109,15 @@ namespace TL.Methods
}
}
- [TLDef(0xD61E1DF3)]
+ [TLDef(0x8FB53057)]
public sealed partial class Phone_JoinGroupCall : IMethod
{
public Flags flags;
- public InputGroupCall call;
+ public InputGroupCallBase call;
public InputPeer join_as;
[IfFlag(1)] public string invite_hash;
- [IfFlag(3)] public long key_fingerprint;
+ [IfFlag(3)] public Int256 public_key;
+ [IfFlag(3)] public byte[] block;
public DataJSON params_;
[Flags] public enum Flags : uint
@@ -13079,35 +13125,35 @@ namespace TL.Methods
muted = 0x1,
has_invite_hash = 0x2,
video_stopped = 0x4,
- has_key_fingerprint = 0x8,
+ has_public_key = 0x8,
}
}
[TLDef(0x500377F9)]
public sealed partial class Phone_LeaveGroupCall : IMethod
{
- public InputGroupCall call;
+ public InputGroupCallBase call;
public int source;
}
[TLDef(0x7B393160)]
public sealed partial class Phone_InviteToGroupCall : IMethod
{
- public InputGroupCall call;
+ public InputGroupCallBase call;
public InputUserBase[] users;
}
[TLDef(0x7A777135)]
public sealed partial class Phone_DiscardGroupCall : IMethod
{
- public InputGroupCall call;
+ public InputGroupCallBase call;
}
[TLDef(0x74BBB43D)]
public sealed partial class Phone_ToggleGroupCallSettings : IMethod
{
public Flags flags;
- public InputGroupCall call;
+ public InputGroupCallBase call;
[IfFlag(0)] public bool join_muted;
[Flags] public enum Flags : uint
@@ -13120,14 +13166,14 @@ namespace TL.Methods
[TLDef(0x041845DB)]
public sealed partial class Phone_GetGroupCall : IMethod
{
- public InputGroupCall call;
+ public InputGroupCallBase call;
public int limit;
}
[TLDef(0xC558D8AB)]
public sealed partial class Phone_GetGroupParticipants : IMethod
{
- public InputGroupCall call;
+ public InputGroupCallBase call;
public InputPeer[] ids;
public int[] sources;
public string offset;
@@ -13137,7 +13183,7 @@ namespace TL.Methods
[TLDef(0xB59CF977)]
public sealed partial class Phone_CheckGroupCall : IMethod
{
- public InputGroupCall call;
+ public InputGroupCallBase call;
public int[] sources;
}
@@ -13145,7 +13191,7 @@ namespace TL.Methods
public sealed partial class Phone_ToggleGroupCallRecord : IMethod
{
public Flags flags;
- public InputGroupCall call;
+ public InputGroupCallBase call;
[IfFlag(1)] public string title;
[IfFlag(2)] public bool video_portrait;
@@ -13161,7 +13207,7 @@ namespace TL.Methods
public sealed partial class Phone_EditGroupCallParticipant : IMethod
{
public Flags flags;
- public InputGroupCall call;
+ public InputGroupCallBase call;
public InputPeer participant;
[IfFlag(0)] public bool muted;
[IfFlag(1)] public int volume;
@@ -13184,7 +13230,7 @@ namespace TL.Methods
[TLDef(0x1CA6AC0A)]
public sealed partial class Phone_EditGroupCallTitle : IMethod
{
- public InputGroupCall call;
+ public InputGroupCallBase call;
public string title;
}
@@ -13198,7 +13244,7 @@ namespace TL.Methods
public sealed partial class Phone_ExportGroupCallInvite : IMethod
{
public Flags flags;
- public InputGroupCall call;
+ public InputGroupCallBase call;
[Flags] public enum Flags : uint
{
@@ -13209,14 +13255,14 @@ namespace TL.Methods
[TLDef(0x219C34E6)]
public sealed partial class Phone_ToggleGroupCallStartSubscription : IMethod
{
- public InputGroupCall call;
+ public InputGroupCallBase call;
public bool subscribed;
}
[TLDef(0x5680E342)]
public sealed partial class Phone_StartScheduledGroupCall : IMethod
{
- public InputGroupCall call;
+ public InputGroupCallBase call;
}
[TLDef(0x575E1F8C)]
@@ -13229,20 +13275,20 @@ namespace TL.Methods
[TLDef(0xCBEA6BC4)]
public sealed partial class Phone_JoinGroupCallPresentation : IMethod
{
- public InputGroupCall call;
+ public InputGroupCallBase call;
public DataJSON params_;
}
[TLDef(0x1C50D144)]
public sealed partial class Phone_LeaveGroupCallPresentation : IMethod
{
- public InputGroupCall call;
+ public InputGroupCallBase call;
}
[TLDef(0x1AB21940)]
public sealed partial class Phone_GetGroupCallStreamChannels : IMethod
{
- public InputGroupCall call;
+ public InputGroupCallBase call;
}
[TLDef(0xDEB3ABBF)]
@@ -13259,11 +13305,71 @@ namespace TL.Methods
public InputFileBase file;
}
- [TLDef(0xDFC909AB)]
- public sealed partial class Phone_CreateConferenceCall : IMethod
+ [TLDef(0x7D0444BB)]
+ public sealed partial class Phone_CreateConferenceCall : IMethod
{
- public InputPhoneCall peer;
- public long key_fingerprint;
+ public Flags flags;
+ public int random_id;
+ [IfFlag(3)] public Int256 public_key;
+ [IfFlag(3)] public byte[] block;
+ [IfFlag(3)] public DataJSON params_;
+
+ [Flags] public enum Flags : uint
+ {
+ muted = 0x1,
+ video_stopped = 0x4,
+ join = 0x8,
+ }
+ }
+
+ [TLDef(0x8CA60525)]
+ public sealed partial class Phone_DeleteConferenceCallParticipants : IMethod
+ {
+ public Flags flags;
+ public InputGroupCallBase call;
+ public long[] ids;
+ public byte[] block;
+
+ [Flags] public enum Flags : uint
+ {
+ only_left = 0x1,
+ kick = 0x2,
+ }
+ }
+
+ [TLDef(0xC6701900)]
+ public sealed partial class Phone_SendConferenceCallBroadcast : IMethod
+ {
+ public InputGroupCallBase call;
+ public byte[] block;
+ }
+
+ [TLDef(0xBCF22685)]
+ public sealed partial class Phone_InviteConferenceCallParticipant : IMethod
+ {
+ public Flags flags;
+ public InputGroupCallBase call;
+ public InputUserBase user_id;
+
+ [Flags] public enum Flags : uint
+ {
+ video = 0x1,
+ }
+ }
+
+ [TLDef(0x3C479971)]
+ public sealed partial class Phone_DeclineConferenceCallInvite : IMethod
+ {
+ public int msg_id;
+ }
+
+ [TLDef(0xEE9F88A6)]
+ public sealed partial class Phone_GetGroupCallChainBlocks : IMethod
+ {
+ public InputGroupCallBase call;
+ public int sub_chain_id;
+ public int offset;
+ public int limit;
}
[TLDef(0xF2F2330A)]
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index 36011aa..892f37e 100644
--- a/src/TL.Table.cs
+++ b/src/TL.Table.cs
@@ -6,7 +6,7 @@ namespace TL
{
public static partial class Layer
{
- public const int Version = 201; // fetched 20/04/2025 01:20:15
+ public const int Version = 202; // fetched 01/05/2025 10:01:40
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -217,6 +217,7 @@ namespace TL
[0xACDFCB81] = typeof(MessageActionStarGiftUnique),
[0xAC1F1FCD] = typeof(MessageActionPaidMessagesRefunded),
[0xBCD71419] = typeof(MessageActionPaidMessagesPrice),
+ [0x2FFE2F7A] = typeof(MessageActionConferenceCall),
[0xD58A08C6] = typeof(Dialog),
[0x71BD134C] = typeof(DialogFolder),
[0x2331B22D] = typeof(PhotoEmpty),
@@ -424,6 +425,7 @@ namespace TL
[0x283BD312] = typeof(UpdateBotPurchasedPaidMedia),
[0x8B725FCE] = typeof(UpdatePaidReactionPrivacy),
[0x504AA18F] = typeof(UpdateSentPhoneCode),
+ [0xA477288F] = typeof(UpdateGroupCallChainBlocks),
[0xA56C2A3E] = typeof(Updates_State),
[0x5D75A138] = typeof(Updates_DifferenceEmpty),
[0x00F49CA0] = typeof(Updates_Difference),
@@ -756,7 +758,7 @@ namespace TL
[0xE095C1A0] = typeof(PhoneCallDiscardReasonDisconnect),
[0x57ADC690] = typeof(PhoneCallDiscardReasonHangup),
[0xFAF7E8C9] = typeof(PhoneCallDiscardReasonBusy),
- [0xAFE2B839] = typeof(PhoneCallDiscardReasonAllowGroupCall),
+ [0x9FBBF1F7] = typeof(PhoneCallDiscardReasonMigrateConferenceCall),
[0x7D748D04] = typeof(DataJSON),
[0xCB296BF8] = typeof(LabeledPrice),
[0x049EE584] = typeof(Invoice),
@@ -789,11 +791,11 @@ namespace TL
[0x32DA9E9C] = typeof(InputStickerSetItem),
[0x1E36FDED] = typeof(InputPhoneCall),
[0x5366C915] = typeof(PhoneCallEmpty),
- [0xEED42858] = typeof(PhoneCallWaiting),
- [0x45361C63] = typeof(PhoneCallRequested),
- [0x22FD7181] = typeof(PhoneCallAccepted),
- [0x3BA5940C] = typeof(PhoneCall),
- [0xF9D25503] = typeof(PhoneCallDiscarded),
+ [0xC5226F17] = typeof(PhoneCallWaiting),
+ [0x14B0ED0C] = typeof(PhoneCallRequested),
+ [0x3660C311] = typeof(PhoneCallAccepted),
+ [0x30535AF5] = typeof(PhoneCall),
+ [0x50CA4DE1] = typeof(PhoneCallDiscarded),
[0x9CC123C7] = typeof(PhoneConnection),
[0x635FE375] = typeof(PhoneConnectionWebrtc),
[0xFC878FC8] = typeof(PhoneCallProtocol),
@@ -1031,8 +1033,10 @@ namespace TL
[0xE8FD8014] = typeof(PeerBlocked),
[0x7FE91C14] = typeof(Stats_MessageStats),
[0x7780BCB4] = typeof(GroupCallDiscarded),
- [0xCDF8D3E3] = typeof(GroupCall),
+ [0x553B0BA1] = typeof(GroupCall),
[0xD8AA840F] = typeof(InputGroupCall),
+ [0xFE06823F] = typeof(InputGroupCallSlug),
+ [0x8C10603F] = typeof(InputGroupCallInviteMessage),
[0xEBA636FE] = typeof(GroupCallParticipant),
[0x9E727AAD] = typeof(Phone_GroupCall),
[0xF47751B6] = typeof(Phone_GroupParticipants),
diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj
index 1debd31..a19c731 100644
--- a/src/WTelegramClient.csproj
+++ b/src/WTelegramClient.csproj
@@ -13,7 +13,7 @@
WTelegramClient
0.0.0
Wizou
- Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 201
+ Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 202
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))