telegram-s / telegram-api-old

Telegram Api library for java
MIT License
138 stars 64 forks source link

Is it possible to add contacts to channel in Telegram API? #43

Closed samirae closed 8 years ago

samirae commented 8 years ago

Is it possible for me to add contacts to my Channel using telegram API?

I'm trying to make an application that sync my website customers with my Telegram Channel.

hesampour commented 8 years ago

I am looking for that too. Did you find any way?

samirae commented 8 years ago

Yes i did,

for further information go to https://core.telegram.org/method/messages.addChatUser

you can find a method called addUserToChat in: MessagesController.class

For example: ContactsActivity fragment = new ContactsActivity(args); fragment.setDelegate(new ContactsActivity.ContactsActivityDelegate() { @Override public void didSelectContact(TLRPC.User user, String param) { MessagesController.getInstance().addUserToChat(chat_id, user, info, param != null ? Utilities.parseInt(param) : 0, null, null); } });

BlancoLanda commented 7 years ago

@samirae But that seems to be useful for adding users to chats, not channels. Right? I want to add an user to a channel (not chat) but I don't know how...

samirae commented 7 years ago

It's the only possible way

On Sat, Feb 25, 2017 at 12:25 AM BlancoLanda notifications@github.com wrote:

@samirae https://github.com/samirae But that seems to be useful for adding users to chats, not channels. Right? I want to add an user to a channel (not chat) but I don't know how...

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/ex3ndr/telegram-api/issues/43#issuecomment-282402077, or mute the thread https://github.com/notifications/unsubscribe-auth/AJiN2ZtAWns_x3vwkDr5cqX7vsnhdwNoks5rf0PPgaJpZM4Go_y_ .

-- Sincerely Samira Ekrami

Legend-of-Success commented 7 years ago

@samirae does telegram have any constraints in number of users which will be added to our channel?

clickbetexch commented 2 years ago

@samirae did you find any solution for adding user to telegram channel ? not for chat.

samirae commented 2 years ago

Hey @clickbetexch, i did, but then my account got limited by telegram!

clickbetexch commented 2 years ago

Hey @ex3ndr can you please let me know how you did it? 

---- On Wed, 10 Aug 2022 11:58:36 +0530 Samira @.***> wrote ---

Hey https://github.com/clickbetexch, i did, but then my account got limited by telegram!

— Reply to this email directly, https://github.com/ex3ndr/telegram-api/issues/43#issuecomment-1210218878, or https://github.com/notifications/unsubscribe-auth/AVAGWBLE3QNNJJ6MZWWQRZLVYNDZJANCNFSM4BVD7S7Q. You are receiving this because you were mentioned.