0

After joining a channel that has a linked group (like comments) I'm getting the following:

  1. In Telegram Desktop client I see only the channel that I've joined to.
  2. Via Telegram API, using WTelegram Client client.Messages_GetAllChats(), I'm getting both, the channel and the linked group.

Question: how do I tell that the group was not joined to explicitly, so I don't show it to my user, just like Telegram Desktop does?

The group is a Channel with IsGroup = true, access hash and such. By looking at it I cannot differentiate it from other groups that I've explicitly joined. However, if I try client.Channels_GetFullChannel or client.LeaveChat on it, I'm getting TL.RpcException: 'CHANNEL_INVALID'.

1 Answers1

0

I don't experience the same. I'm a member of various channels with a discussion group but the discussion group doesn't appear in my Messages_GetAllChats.

What probably happens to you is that the group appears in your list as a ChannelForbidden (possibly because you joined and left the group or was kicked).

You should filter the chat list using the IsActive property to keep only the valid ones.

Wizou
  • 1,336
  • 13
  • 24
  • No, this is not the case. Try joining @advokatmugin. You'll find in your Messages_GetAllChats both, 1357265965 which is the channel, and 1726561167 which is a group with comments and it is active and has access hash. Calling Channels_GetFullChannel on 1726561167 gives you CHANNEL_INVALID. I'll take another stub at it later today. I'm definitely missing something very simple and obvious. – Dmitry Demchuk May 22 '23 at 18:07