Delta Chat based comment system for my static blog

Hi,

I wanted to share a project I’ve been working on: Només 5 Línies (which translates to “Only 5 Lines”). It is a microblog where the entire publishing workflow happens directly inside Delta Chat.

I wanted a way to blog that felt as immediate as sending a chat message but without giving up data sovereignty or relying on walled gardens. Until now I was using a Telegram channel, but Telegram is very shady and I cannot trust it. Furthermore, Pavel Durov can read everything. I cannot support that platform, even for a public microblog/channel.

The result is a system where I simply send a message to my bot, and it automatically publishes it to the open web.

The core of the system is a Python bot that sits on a personal computer running 24/7. It acts as a bridge and a static site generator.

  1. I write a post as a regular message in Delta Chat. I can include photos.
  2. The bot (using deltachat-rpc-client) receives the message. It verifies if the sender is authorized (me) and extracts the text and media.
  3. Then the bot publishes the message:
    • The website is static and sitting in a cheap shared hosting service. It was important for me for it to be static as I don’t want to have any security maintenance: The bot updates a JSON database and triggers a static site builder made ad-hoc for this site. It generates HTML pages for the new post, updates the index, and rebuilds the RSS feed. It then deploys the changes to my web server via rsync.
    • Telegram Mirror: It simultaneously forwards the content to a Telegram channel for subscribers there. But my plan is to remove the telegram channel soon.
    • Delta Chat Channel: The content is also broadcasted to a Delta Chat channel.

But, what’s a blog without comments? And how can I have comments with a static website generator? Well, it is easy!

  • Each post on the website has a “Comment via Delta Chat” link.
  • When a new post is created, the bot creates a dedicated Delta Chat group for that specific post.The “comment via Delta Chat” link is the invitation link to the group. Any message sent to this group, appears below the post.
  • User’s can delete their posts by deleting their comments from the group.

I also have an open Delta Chat group where the bot posts all the blog posts and comments. There, anyone can post. It is the microblog’s watercooler. I’m looking forward for Delta Chat to improve it’s support for open public groups.

The project is currently running live at n5l.illadelaire.org (https://n5l.illadelaire.org) (content is in Catalan). Some things need to improve though.

This thing could be implemented thanks to “Codex CLI” and “Gemini CLI”. I’m a scientist and I’m quite good writing scientific software to analyze data, but I’m not sure I would have done this project without AI.

In any case. The thing works like a charm and it is thanks to Delta Chat! I would like to thank its developers.

5 Likes

hi, using normal groups for such public comments is sadly not good, people get exposed to spammers and trolls, it looks you would benefit from having super groups: Spec Proposal: Super Groups

but probably even better would be just to support comments to channels post in Delta Chat client without needing a group per post

3 Likes

Super groups are indeed needed.

You are right. The super groups would be great.

For now, my solution is good enough. Still, few people use Delta chat, so spam is not a problem. Also, people can use burner accounts.

However, you are right that in the mid term the solution is not good.

If you have an idea on how to improve the security of my approach with the current Delta Chat implementation, don’t hesitate to tell me.

I thought that maybe people could send commands to the bot. But I thought that my approach would be easier.

Would it be possible for having links that contain a draft of the message to be sent? In a similar way that you can have mailto messages with a prefilled subject.

this is a feature I have been wanting for years, or alternatively: in theory invite links already have a field that is an arbitrary token/text, it could be used to trigger some command in the bot automatically, but the core doesn’t expose that token in the “contact scanned QR” event

if it worked you could do this: put the post id in the token section of the invite link / QR, then when user click the invite link the bot could send the post in the 1:1 chat with the bot and say “swipe-to-reply this message to comment this post” or something like that

another idea:

you already have a channel where the bot is sending your posts, I guess the posts are using the HTML messages? but even if not, you could set the HTML part of the message to include a mailto: link with a command draft to be autocompleted, ex.
[click here to comment](mailto:mybot@example.com?body=\comment_5555%20)

this will totally work without need of any extra group!

1 Like

This is interesting, especially because editing and deleting comments works: Només 5 línies · N5L

1 Like

Even better: your bot could create an account for each post and advertise that account at the end of the post

I don’t want to hurt or offend anyone in any way, but I have a question - why do they always try to make a social network out of a messenger? there is telegram, there is Facebook, there are many social networks, but why exactly try to turn the messenger into a social network?
All you have to do is put advertisements in the delta chat and happiness and prosperity will come to everyone, well, common! what are you talking about?
once again - this is my opinion delta chat is a chat and not just another telegram or twitter

(It is unfortunate that I can’t edit the reply relationship of my message, neither can I repost it as a good relation after deleting the earlier comment like how most messaging apps and forums work)

Facebook, YouTube, WhatsApp, Istagram, TikTok, WeChat, Telegram, Douyin, Snapchat, Kuaishou, Twitter, Sina Weibo, QQ and Pinterest are neither self-hostable, nor FOSS, let alone all the unethical practices of their owners. A detailed critique of just one of them would take hundreds of pages already.

Providing ethical alternatives to serve just a small fraction of use cases would be doing a great deed to humanity.

2 Likes

A messenger is just a messenger—something you get, use, and then leave. That’s boring. If you have a software-as-a-service model, this is bad, very bad, because you need users to be glued to your app, either to remember you or for you to monetize it.

Users, on the other hand, want an all-in-one app because we’re used to having our attention scattered. If in Delta Chat I can also check a blog, manage my bills, control my home, and feed my dog, all the better. Because it’s a single login for everything and a single place to remember.

2 Likes

…in this case, it’s not a delta chat, it’s a wi-chat or some other monstrous super-app

I see the philosophy of delta chat as an opportunity to communicate with everyone who has mail, and everyone has it!
It’s essentially an email client…
but again, this is just my opinion, I’m not imposing it on anyone, I just don’t understand the point in trying to cram everything into the delta chat, but it’s not necessary

1 Like

A chat client is a tool to communicate. A blog comenting system is also a tool to communicate. They fit well together.

2 Likes

For me it is the upgrade from “email me if you want to give me feedback” comment system.

Yes you are right

I like FOSS because I can get acquintanced with CRAZY people. The idea is interesting and nice. But has the problem adb said.