
Telegram Middleman Bot – Push Notifications as easy as POST - n1try
https://github.com/n1try/telegram-middleman-bot
======
ATsch
I have not looked at this in detail, but I can't see what advantages this has
over just sending a simple http request like this:

    
    
      https://api.telegram.com/botTOKEN/sendMessage?id=YOUR_ID&message="your servers are on fire"
    
    

because that's all you need as far as I know. Works via GET, POST, PUT,
everything.

Only thing I could see is being able to switch it out for other services
easier.

~~~
n1try
You're right, but you'd need your own specific Telegram-internal user id so
that your message will only be routed to your specific chat. With my little
piece of code, n people can register at 1 bot. Without it you would either
have to figure out your user id first or have n separate bots for n people. Of
course, the advantage is not too dramatic ;-) And yes, the ability to link the
bot to further services than only Telegram is another plus.

~~~
angelsl
You can get your own (or group's) chat ID with @get_id_bot, if you don't want
to just get it yourself via `getUpdates`.

------
dingo_bat
Telegram really deserves more attention than it gets. It has the largest
feature set, best multi-platform support with true desktop clients,
awesome/fast mobile apps and a large part of the code is open source. What's
not to love? Just that none of my friends use it :/

~~~
lou1306
And while I know we are an endangered species, I have to say their support for
Windows 10 mobile is top notch. I find their app is better than Whatsapp.

Too bad the network effect is a thing, and also their approach to crypto might
put you off.

~~~
dingo_bat
> approach to crypto might put you off

It doesn't, anymore than whatsapp. Whatsapp says they have end-end encryption.
Has anyone verified it independently? They say they use Signal's tech. Has
anybody verified that the app doesn't just take screenshots of the screen and
send them to facebook for data mining? When your app is closed source, all
claims about security and encryption are meaningless, unless some solid
auditing is done.

~~~
mullen
Same could be said of Telegram. Plus, we know their encryption is not really
that great because no real encryption expert will stand behind Telegram's
encryption and Telegram says "Trust us" when it comes to the subject of their
encryption.

Signal tech is open source, can be checked and has been checked. I am pretty
sure that if Whatsapp was lying about using the Signal encryption libraries,
word would have leaked out of Whatsapp by now. On top of that, I would trust
Moxie 100 times more than I would of the owner of Telegram.

Plus, the idea that Whatsapp is taking screen shots and sending it to Facebook
is pretty silly. It would be really simple for them to have the messages
copied; one going to true receiver and one going to the Facebook servers.
There is no need for elaborate spying by Whatsapp, it would be really simple
for them to spy on you if they wanted to.

* I am not calling the owner of Telegram dishonest, but in the Moxie vs Pavel Durov debate, I am going with Moxie.

~~~
inciampati
You are arguing that we should not blindly trust someone's assertion that a
product is good. For WhatsApp we have to trust someone's assertion that things
are implemented as they claim. For telegram the e2e stuff is at least open
source and directly reviewable.

I don't trust either Moxie or Pavel. At least in one instance we can trust the
code.

~~~
mullen
> You are arguing that we should not blindly trust someone's assertion that a
> product is good.

Then we both should be using Signal since all of Signal is open source. This
is what I use.

> For WhatsApp we have to trust someone's assertion that things are
> implemented as they claim. For telegram the e2e stuff is at least open
> source and directly reviewable.

Telegram still has blobs that are not released with the source code, so there
is still a bit of a block box related to Telegram.

------
soulwatcher
Is there any limit to the number of messages stored in a telegram
conversation? Many users report previous messages being deleted without a
warning

[http://telegramgeeks.com/2016/02/telegram-only-shows-us-
the-...](http://telegramgeeks.com/2016/02/telegram-only-shows-us-the-last-
million-messages/)

~~~
roryisok
The cut off seems to be a million messages, seems like enough to me

~~~
dingo_bat
I've seen my father manually clear all his whatsapp chats at the end of the
week. 1 million is definitely enough for everyone but somebody who's not using
telegram for chat.

~~~
roryisok
As far as I understand it you can't scroll back further than a million, so if
you were using this for notifications, you wouldn't be able to see what your
n-1,000,000th notification was. I could be misinterpreting, but if I'm right I
still don't see it as much of a problem.

------
iuguy
> And they require your little server-side script to include some SMTP library
> and connect to a mail server. That's too heavyweight just to get some short
> information.

Really? Building and deploying a bot made in an arbitrary language is less
onerous than registering for a Gmail account to send mail reports through?

Perhaps it's just the author's sense of humour, but this didn't strike me as
helpful at all. Notifications can be handy for some things, email for other
things. Depends on the person. But it's not hard to set up an email account.
That's partly why it's still around.

------
fishywang
Shameless plug: I did something similar earlier this year[1]. But instead of
running the bot locally, I run it on Google App Engine to provide an HTTPS
API. I also have an Android app to call the API to forward Android
notifications.

My motivation is a little bit different. I made this because Telegram has
great Android Auto support, and also has an easy to use Bots API, so I can
convert non-Android-Auto-compatible notifications into Android Auto
notifications. I explained my motivation in detail in a blog post. [2]

[1] [https://github.com/fishy/notifbot](https://github.com/fishy/notifbot)

[2] [https://wang.yuxuan.org/blog/item/2017/03/smartthings-myq-
an...](https://wang.yuxuan.org/blog/item/2017/03/smartthings-myq-and-scala)

------
gravypod
Why is setting up a bush notification system so difficult that it's easier to
piggy back on telegram? I have a project I want to do that involves making
your own PUSH server (for battery reasons). Would it be difficult to setup

~~~
n1try
I'd be interested in that project, can you show it?

~~~
gravypod
I haven't made it. I've just started thinking about what I'd need to get it
done. I'm a systems dev not an Android app person.

I want to make a thing that will forward my SMSs to a webpage so I can read
them online and I want to be able to start conversation, reply to
conversations, etc. I want it to be open source and free.

I'm not really interested in making it, I just want it.

~~~
swatthatfly
look at Pushbullet, as a browser extension.

~~~
gravypod
This is not self hosted, open source, nor free.

------
JepZ
It's funny to see such projects while one of the main reasons to built
Telegram in the first place was to built something with a simple http api (vs.
the non-http XMPP api) ;-)

------
slackoverflower
Is there something like this for Facebook Messenger?

------
m88m
so...zapier?

