alfred-workflow-telegram icon indicating copy to clipboard operation
alfred-workflow-telegram copied to clipboard

Is it possible to send messages to certain users with this workflow?

Open nikitavoloboev opened this issue 8 years ago • 6 comments

I really wish I could send messages really quickly without opening the 'telegram' window? Would it be possible to do?

Thank you a lot for a great workflow.

nikitavoloboev avatar Jun 23 '16 19:06 nikitavoloboev

As suggested in http://telegram.wiki/tips:urischeme and Telegram Desktop URL parser code at https://github.com/telegramdesktop/tdesktop/blob/893cd9e877af890f57adbbd760b865ed77ec3c37/Telegram/SourceFiles/core/click_handler_types.cpp#L34 and https://github.com/telegramdesktop/tdesktop/blob/893cd9e877af890f57adbbd760b865ed77ec3c37/Telegram/SourceFiles/mainwidget.cpp#L3264, there is not an URL scheme I can use to talk to Telegram client.

Since Telegram don't have "local" API, there are 2 ways to implement this:

  1. Let Alfred write text to Telegram, press send then close the window. This is a lot like you typing the text yourself, and cannot prevent Telegram window from coming to top for a little while.
  2. Implement Telegram API in this workflow, then you can login and send anything to anyone. This is something big to do.

Haven't upgraded to Alfred 3 to see what they've been offering now, since I bought v2 powerpack only. Will look into this later when I had money.

Jamesits avatar Jun 24 '16 01:06 Jamesits

Have you looked into this cli utility? I think it has a feature of sending things to users. 2016-06-24 at 17 35

Or is it no longer supported?

nikitavoloboev avatar Jun 24 '16 15:06 nikitavoloboev

Have been tweaking tg-cli for months. The problems are:

  1. It won't build on my Mac for unknown reason, though worked well on all my Linux machines.
  2. I don't know if a prebuilt binary will work on all Macs or distributing it is legitimate. If not, you may have to compile it on every single Macs.
  3. I don't think I should leave it running on the background (since it's only a workflow), but if not, every message will have >20s delay for tg-cli to get up and prepare breakfast.
  4. It uses an old API version. However telegram provided another old one on their documentation. All other official telegram clients use a new API version. I am confused on this.

So currently I would rather not consider integrating tg-cli into this workflow.

Jamesits avatar Jun 24 '16 15:06 Jamesits

That makes sense, thank you for clarifying it.

It is kind of sad there is no easy way to achieve this.

nikitavoloboev avatar Jun 24 '16 15:06 nikitavoloboev

@Jamesits You have mentioned something about a workflow. Do you mind explaining a bit more in details for a Telegram newbie? Thanks in advance.

pepBR avatar Oct 07 '16 01:10 pepBR

@pepBR Not sure what you are asking. To use this you need:

  • A Mac with macOS
  • Alfred and Alfred Powerpack license

Jamesits avatar Oct 08 '16 23:10 Jamesits