From dcfd89c2a8f499bb26b7aeb947ffe09466c10a46 Mon Sep 17 00:00:00 2001 From: Wizou <11647984+wiz0u@users.noreply.github.com> Date: Sat, 21 Sep 2024 19:39:41 +0200 Subject: [PATCH] AnalyzeInviteLink: hacky detection of request_needed/join_request for basic chat links --- .github/dev.yml | 2 +- src/Client.Helpers.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/dev.yml b/.github/dev.yml index 16ed768..e72c5c8 100644 --- a/.github/dev.yml +++ b/.github/dev.yml @@ -1,7 +1,7 @@ pr: none trigger: [ master ] -name: 4.1.10-dev.$(Rev:r) +name: 4.1.11-dev.$(Rev:r) pool: vmImage: ubuntu-latest diff --git a/src/Client.Helpers.cs b/src/Client.Helpers.cs index c0c13ab..d09b441 100644 --- a/src/Client.Helpers.cs +++ b/src/Client.Helpers.cs @@ -754,7 +754,8 @@ namespace WTelegram } var rrAbout = ci.about == null ? null : new RestrictionReason[] { new() { text = ci.about } }; return !ci.flags.HasFlag(ChatInvite.Flags.channel) - ? new Chat { title = ci.title, photo = chatPhoto, participants_count = ci.participants_count } + ? new Chat { title = ci.title, photo = chatPhoto, participants_count = ci.participants_count, + flags = ci.flags.HasFlag(ChatInvite.Flags.request_needed) ? (Chat.Flags)Channel.Flags.join_request : 0 } : new Channel { title = ci.title, photo = chatPhoto, participants_count = ci.participants_count, restriction_reason = rrAbout, flags = Channel.Flags.min | (ci.flags.HasFlag(ChatInvite.Flags.broadcast) ? Channel.Flags.broadcast : 0) |