Is there a way to receive new messages that are posted in specific Telegram channels in nodejs? I.e. something similar to the twitter streaming api.
There are two or three channels that I am interested in. I want my app, written in nodejs, to get any new messages/updates/pinnedmessages that are posted in these channels (these are channels created by others, not me). My app would then perform a certain action (not on Telegram) if the new messages that were posted in the Telegram channel meet certain conditions.
Is this possible, or does this run contrary to how Telegram works?
Related
There are two voice channels and you need to broadcast the radio in one, and in the other the music that users want. There is no problem with this, but when the bot connects to the second channel, it leaves the first.
How to connect a bot to two voice channels at once
I am sorry but I think that is not possible. The bot is a user as you are, can you connect to two voice channels at the same time?
I have a load balanced situation, in which I have multiple instances running. I'm subscribing to a channel in each instance, but I only want one of them to trigger when a message comes through.
Is there any way to accomplish this?
If you want to have different subscribers and some are only interested in a subset of the messages distributed by a your publisher. Then your messaging service must allow subscribers to specify the topics relevant for them and/or inspect the messages and specify the content they are interested in.
that kind of goes against pub/sub pattern. Even if you added a streaming application in between you channel and your clients, this will still need to read all messages to decide which one to filter out to different clients
If you mean, for example, Android or IOS notifications, then you are able to store push tokens in your database, filter them and send a message only selected users.
P.S. It could help if you provide more details about the environment of push notifications you ask, and an architecture of the application you develop.
I am interested in developing a realtime log reader in Python that can send notifications via telegram bot.
I am interested in developing a realtime log reader in Python that can send notifications via telegram bot.
Basically I want to:
Read server log in realtime
Track it for specific errors
If condition of error is met, I want program to notify me and my
team via telegram bot with specific message
If error is no longer appearing in log, I want program to notify me and my team via telegram bot with specific message
I don't know where to start. What libraries I should go through? Which technology(daemon for i.e) I should better use?
I am developing chat application using Pusher. As of now whenever user logs in into his account, he is subscribed to a channel like below:
`var channel = pusher.subscribe('<?='myChannel'.$_SESSION['USERID']?>');`
I would like to update the status in chat list for online/offline so that other users can get to know whether user is online or not. How can I do that?
Normally you would use presence channels for this. These channels have special events which are broadcast to all other subscribers when a members subscribes/unsubscribes from the channel.
It looks like you have a channel per user, so this wouldn't work by simply converting the existing channels to presence channels. Instead you could have a special presence channel in addition to the per-user channels that all users subscribe to. Here you can bind to presence events and update the members list.
I am using PubNub to create a Chat. Each chatroom is a PubNub channel. The challenge now is: how do I sort my channels such that channels with most recent posts should be on top.
I can think on 2 possibilities:
Server will listen to all channels, when a message is received, it logs it. So a chatroom model might look like {id, name, users, lastUpdate}
Everytime message is posted, app will also call server to pass in that message
Both methods doesnt seem to correct? Is there a better way? The first will require the server to listen on all channels. The second will require server to handle a request for each message.
How about using timestamp?
Actually, PubNub offers Presence APIs that lets you monitor the state of each channel, with timestamp (which specified as 17-digit precision unix time).
http://www.pubnub.com/knowledge-base/discussion/276/presence