mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
Added helpers Message.ReplyHeader .TopicID. Fix duplicate pinned in Channels_GetAllForumTopics
This commit is contained in:
parent
33dd2d02d6
commit
f1c1d0a6a2
|
|
@ -626,7 +626,7 @@ namespace WTelegram
|
|||
/// <param name="q">Search query</param>
|
||||
public async Task<Messages_ForumTopics> Channels_GetAllForumTopics(InputChannelBase channel, string q = null)
|
||||
{
|
||||
var result = await this.Channels_GetForumTopics(channel, limit: 20, q: q);
|
||||
var result = await this.Channels_GetForumTopics(channel, offset_date: DateTime.MaxValue, q: q);
|
||||
if (result.topics.Length < result.count)
|
||||
{
|
||||
var topics = result.topics.ToList();
|
||||
|
|
|
|||
|
|
@ -308,6 +308,7 @@ namespace TL
|
|||
partial class ChatParticipantsForbidden { public override ChatParticipantBase[] Participants => []; }
|
||||
partial class ChatParticipants { public override ChatParticipantBase[] Participants => participants; }
|
||||
|
||||
partial class MessageBase { public MessageReplyHeader ReplyHeader => ReplyTo as MessageReplyHeader; }
|
||||
partial class MessageEmpty { public override string ToString() => "(no message)"; }
|
||||
partial class Message { public override string ToString() => $"{(from_id ?? peer_id)?.ID}> {message} {media}"; }
|
||||
partial class MessageService { public override string ToString() => $"{(from_id ?? peer_id)?.ID} [{action.GetType().Name[13..]}]"; }
|
||||
|
|
@ -757,6 +758,7 @@ namespace TL
|
|||
}
|
||||
|
||||
partial class Theme { public static implicit operator InputTheme(Theme theme) => new() { id = theme.id, access_hash = theme.access_hash }; }
|
||||
partial class MessageReplyHeader { public int TopicID => flags.HasFlag(Flags.forum_topic) ? flags.HasFlag(Flags.has_reply_to_top_id) ? reply_to_top_id : reply_to_msg_id : 0; }
|
||||
partial class GroupCallBase { public static implicit operator InputGroupCall(GroupCallBase call) => new() { id = call.ID, access_hash = call.AccessHash }; }
|
||||
|
||||
partial class RequestedPeer { public abstract long ID { get; } }
|
||||
|
|
|
|||
Loading…
Reference in a new issue