sochix / TLSharp

Telegram client library implemented in C#
1k stars 380 forks source link

How to add a contact to my group as an Admin #864

Open ram-sh opened 5 years ago

ram-sh commented 5 years ago

Hello all,

I'm an admin of a private group and I'm looking for how to add an existing contact to my group.

Any assistance is highly appreciated!

Best to you all, Ram

ErezMor commented 5 years ago

trying to do the same, im using the folowing code: async Task InviteUserToChannel(TLAbsInputUser user, TLInputChannel channelid, TelegramClient client) { TLVector u = new TLVector(); u.Add(user); var req = new TLRequestInviteToChannel() { Channel = channelid, Users = u }; var update = client.SendRequestAsync(req).Result; return update; } my problem is how to create the TLAbsInputUser user parameter (got a TLUser object found by phone number or id)

cheers, Erez