Telegram channel with comment functionality

t_logo
Telegram

Telegram channels are one way in terms of communication — the admins send message and subscribers can view. By attaching buttons to messages, admins can let members interact with messages such as liking or disliking — which is the most common use case. What about if a member wants to comment on a given message? There are a couple of workarounds, one being having a bot that handles user messages. But this has a problem of not being able to associate a member’s comment to a given message. Anyway, as an initial workaround I created a bot that let members provide comments and the bot forwards the message to the channel. It works but nobody knew which comment was for which message. In addition, there is also a spam problem; people could spam subscribers.

Screen Shot 2019-03-13 at 2.30.25 PM
Telegram channel with comments feature

After a bit of thinking, I came up with this simple solution. Have a new button called Add comments associated to a message (in addition to the like and dislike buttons) that when clicked, takes the user to a website that hosts the comment for that specific message. The end result looks like the image above. Very simple idea but having the ‘chicken or egg’ problem. When broadcasting a message with those 3 buttons (comment, like and dislike), the comment button should point to a unique URL (e.g., xyz.com/comments?message_id=1234) that identifies that given message. However, while broadcasting the message, we do not have the message ID as the ID is generated later by Telegram after broadcasting.

The workaround for this problem is to broadcast the message first without the button, get the ID, then immediately modify the message by adding the button with the required ID. Works perfectly.

Of course, we are required to implement the backend that handles comments (i.e., xyz.com/comments). That is not related to Telegram. However, you can either use a readymade script (considering security regarding user input) or integrate disqus avoiding the hassle.

In order to add a little bit of gamification to motivate people to read/add comments, I added the count of current comments for that message on the button.

You can then extend the comments page to add additional interesting stuff including monetizing your Telegram channel.

The idea presented here is implemented for a fully automated Telegram breaking news channel with thousands of subscribers. Instead of passively reading contents, members now can comment or discuss on messages in addition to voting.

Cheers!

 

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.