Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

telegram-purple in bitlbee #23

Closed
ghost opened this issue Nov 26, 2014 · 9 comments
Closed

telegram-purple in bitlbee #23

ghost opened this issue Nov 26, 2014 · 9 comments
Labels

Comments

@ghost
Copy link

ghost commented Nov 26, 2014

i have tried to use telegram-purple in de bitlbee-purple application in the irssi and weechat irc clients. i can get as far as setting the 'password' and 'code' variable (assuming this is the sms code i receive), then trying to log in disconnects the whole bitlbee server(running on localhost).

@majn
Copy link
Owner

majn commented Nov 26, 2014

Hi,

unfortunately this doesn’t work in the current version. The fallback mode is used to work with older version of libtgl, since it would already store the old authentication key before the registration, but now it doesn't do that anymore and the old SMS code is not valid with a new authentication key.

I’m currently working on a new fallback mode, where it would simply open a new chat where you can enter the SMS code, in case the requests-API to open the popup is not available.

@ghost
Copy link
Author

ghost commented Nov 26, 2014

Hi,

Sounds promising, do you think the fallback mode would work in bitlbee like that?

@majn
Copy link
Owner

majn commented Nov 26, 2014

I haven't used Bitlbee yet, I only know that there are other messengers like Empathy that also don't implement the user request and I implement that mode to make it work on those.

Its impossible to guarantee that it will work on applications that load libpurple plugins in some non-standard way, but I will try to make it work on as many as possible.

@ghost
Copy link
Author

ghost commented Nov 26, 2014

ok thanks, i will keep an eye on the project for updates and will keep trying.

@majn
Copy link
Owner

majn commented Nov 26, 2014

I commited the new fallback mode, does it work now?

@ghost
Copy link
Author

ghost commented Nov 26, 2014

It does say im signed in but no contacts. I get the code but i dont get a new conversation to fill in the code.
could it be possible to make it work like i tried before where i set 'code' variable?

what is the password for by the way?

this is what i get without a password set

input>account telegram on
Enter password for account telegram first (use /OPER)

these are the options i can set
input>account telegram set
auto_connect = 'true'
auto_reconnect = 'true'
away is empty
compat-verification = 'false'
display_name is empty
nick_format is empty
nick_source = 'handle'
password = '********' (hidden)
tag = 'telegram'
username = '#########'

@majn
Copy link
Owner

majn commented Nov 26, 2014

Hi, I just installed a bitlbee server on a VM and I can confirm that the patch doesn't work.
Setting the code as an account option doesn't work, as I need a way to to resend the SMS code during runtime and can't restart the plugin (authentication key issue I've already described in the comment above). Afaik there is no event that signals account setting changes, so I don't know when and if the code was changed.

Bitlbee doesn't seem to open a chat because the prplcb_conv_new callback will only handle Conversations of type "CHAT". Of course I could change the type of the chat but that might cause problems in Empathy or other clients that don't support group chats. To be honest, I really don't want to go down the road of adding a hack or a workaround for every single libpurple client that doesn't implement all ui operations.

Implementing this in Bitlbee is probably as easy as implementing purple_request_input and calling request_add with the right parameter.

@ghost
Copy link
Author

ghost commented Nov 26, 2014

i understand, thanks for having a look at it. I will try to find a workaround with the info you just gave.

is it perhaps possible to use data generated bij the tg-cli from vysheng?

@prtksxna
Copy link

I am still facing this. @ghost were you able to figure out a workaround?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants