[icon ] blenderdumbass . org [icon scene] Articles

How I am fighting the WhatsApp monopoly

October 08, 2026

👁 4

https://blenderdumbass.org/do_login : 👁 1

#whatsapp #matrix #whatsapptomatrixbridge #bridge #freesoftware #opensource

License:
Creative Commons Attribution Share-Alike

[avatar]by Blender Dumbass

Aka: J.Y. Amihud. A Jewish by blood, multifaceted artist with experience in film-making, visual effects, programming, game development, music and more. A philosopher at heart. An activist for freedom and privacy. Anti-Paternalist. A user of Libre Software. Speaking at least 3 human languages. The writer and director of the 2023 film "Moria's Race" and the lead developer of it's game sequel "Dani's Race".


13 Minute Read



WhatsApp, fucking WhatsApp. The app that everybody uses without thinking twice, that makes no sense being used in places that I have seen it being used. Fucking police officers share police-work-related stuff via WhatsApp groups for the entire user-data department of Meta ( and their data-brokers ) to see. This has to stop! WhatsApp has to be defeated! c:0 ↩ Reply

The Background


At work, for about a year ( I work in an Icream Shop ) I avoided the need to use the work-based WhatsApp group by simply being a person with a dumb-phone. I would flash my Nokia, and they would understand why I haven't seen the last update or something. The boss adopted to it rather quickly and was calling me or sending me regular SMS, when I specifically was required to know something. When a digital file was needed, she would send me an Email. ↩ Reply

Then the bosses have changed, and the new boss immediately made me one of the chefs. Now I no longer sell icecream, I make it. I operate the Cattabriga Multifreeze 12 Pro machine and do all the various preparations and stuff to make the icecream tasty and beautiful. ↩ Reply

The problem is, the boss ( or more like the boss's boss ) really wanted me to be in the WhatsApp groups. Specifically so I could photograph and send them things, if something goes wrong with the machines. My new boss even brought one of his own old phones to work, bought for it a new SIM-card and made an account for me. Thankfully he understood some of my concerns and didn't call my account in my name. It has a generic "The Icecream Man" account. Fuck. ↩ Reply

In any case, working with WhatsApp directly didn't feel right. And the boss of the boss demanded me to take the store-phone home as if it is mine. But I'm not going to sit with an active Meta spy in my house. Are you fucking kidding me? c:1 ↩ Reply

So I decided to make a Matrix bridge. ↩ Reply

Official Matrix-to-Whatsapp bridge?


I installed F-Droid on the store-phone ( it still works ), and through it installed a few apps that I might need: Termux ( because I thought to host the bridge on the phone itself ), Libre Camera and Libre Gallery, because I'm not using the standard Android ones, are you kidding me, Element X, to make an account for this phone, and a few other things including SuperTuxKart, because why not. ↩ Reply

Then I started trying to piece together how the Matrix Official WhatsApp bridge works. And to my horror this required me to have admin access to a matrix server. I use a x.madiator.org matrix server and could ask Madiator to implement it, but unfortunately at the time I needed it the most he was out of his base and couldn't do that. ( Now as he returned he says he could, will see what I decide ). ↩ Reply

Basically the official Matrix-to-WhatsApp bridge is a plugin for the synapse server, which allows it to create a bunch of accounts ( as I understand ) to represent various people on the WhatsApp side. This is useful to make the bridge seamless. ↩ Reply

Two issues with that: ↩ Reply

  • It is not very beginner friendly. As in those people that most need a WhatsApp bridge might not have any way of using it. I needed something I could run in a terminal, at least. And use 1 standard matrix account. ↩ Reply
  • It perhaps makes the bridging a bit too seamless. As in, it won't force people to move away from WhatsApp. Which is the entire goal of this operation. ↩ Reply
I need to defeat WhatsApp, not work with it. ↩ Reply

My own bridge


So I thought, how hard it would be to make my own bridge? There is the official one, so there is a method to connect to WhatsApp and somehow scrape it periodically. And send messages to it, periodically. And I know of at least one descent Matrix bot modules for python that I've used. ↩ Reply

I thought I'd do something like this: I make a matrix bot that listens to new messages in some matrix group related to the work. And when there is a new message it forwards it to the WhatsApp side of things using some WhatsApp API call. ↩ Reply

Say I write: ↩ Reply

Hello there.
↩ Reply

It would post on WhatsApp this: ↩ Reply

@blenderdumbass:x.madiator.org at Matrix has sent: Hello there.
↩ Reply

And do a similar thing in the other direction. ↩ Reply

This would constantly remind people of the Matrix group. And would give me more and more opportunity to rescue them out of WhatsApp. ↩ Reply

I've implemented a simple text-based bridge in 3 days: ↩ Reply


Day 1: Looking for a WhatsApp API thingie


On day one I took the damned phone home ( as they initially wanted me to do ) in order to hack on it. I needed a way to be able to access WhatsApp messages and send WhatsApp messages back. ↩ Reply

At first, looking at the official Matrix Bridge I found a link to Beeper. Which apparently is a Matrix based app that can also connect to various other things like WhatsApp. It was not found in F-Droid ( red flag ). ↩ Reply

But looking though their Github repos, and seeing that they posted a lot of Free Software I decided that it is at least better that using WhatsApp directly. So I installed it ( on the phone ), hooked it to WhatsApp, and guess what... it worked. And I could also invite this Beeper account into the matrix group. Which means Beeper is 100% matrix as well. ↩ Reply

Now, is Beeper itself Free Software? I don't really know. I can't find the app source code anywhere. So I'm not sure. But it feels mildly better to use this than to use the Meta's app. ↩ Reply

I started looking further into it. I found nchat. A little free software terminal client app that supports WhatsApp. I installed it, hooked it up to the WhatsApp account. And wow, now I can not take the phone home. I have access to all the whatsapp shenanigans from my terminal. ↩ Reply

But that was not all. If I just use nchat I will not rescue people on the WhatsApp side out of WhatsApp. So I needed to look further. ↩ Reply

nchat had a way to export messages ( which I could use for the bridge ), but I couldn't write messages. I mean I could have hacked into it a little bit to make it work. It is a cli app anyway, so I can STDIN into it. But come on. ↩ Reply

I ended up finding wacli. This is not so much a cli, but more of a bash able interface for WhatsApp. Which is amazing. ↩ Reply

This is exactly what I need. And not just that I can use bash syntax to send messages, it can also output the messages in JSON. Like can it be any better? ↩ Reply

I had this work by the end of Day 1. It was something like 1 AM and I had to run to bed. ↩ Reply


Day 2 and 3: Fighting with the Matrix bot


I started the codeberg repository for my WhatsApp to Matrix bridge on day 2. I knew how I want to make it. ↩ Reply

2 loops. One handling incoming messages from Matrix and sending them over to WhatsApp and another handing incoming messages from WhatsApp and sending the to Matrix. ↩ Reply

I was going to use the simplematrixbotlib for the Matrix side of things, and some manually made python code to bashinteract with wacli for the WhatsApp side of things. ↩ Reply

Fuck simplematrixbotlib! ↩ Reply

Or more like: ↩ Reply

Fuck asyncio! c:2 ↩ Reply

Making it send from Matrix to WhatsApp - easy. ↩ Reply
Making it send from WhatsApp to Matrix - almost easy. ↩ Reply

Making it do both - a fucking nightmare. ↩ Reply

Let me attempt to explain the fucking nightmare. ↩ Reply

import simplematrixbotlib as botlib

creds = botlib.Creds("https://home.server", "echo_bot", "pass")
bot = botlib.Bot(creds)
PREFIX = '!'

@bot.listener.on_message_event
async def echo(room, message):
    match = botlib.MessageMatch(room, message, bot, PREFIX)

    if match.is_not_from_this_bot() and match.prefix() and match.command("echo"):

        await bot.api.send_text_message(
            room.room_id, " ".join(arg for arg in match.args())
            )

bot.run()




This is the example code of simplematrixbotlib on their PyPi page. Notice the @bot.listener.on_message_event part followed by async def function. ↩ Reply

Well ladies and gentleman, we found the bitch. ↩ Reply

In my mind python's asyncio was kind of like a new, fancy version of threading. I thought that there is a loop somewhere started by bot.run() which executes this async function in a separate thread when a certain condition is met. I was wrong. ↩ Reply

For the whole of day 2 I was fighting with the code under this assumption. And nothing I did would allow both sides to work coherently together. ↩ Reply

See I can't just use the bot.api.send_text_message() function in a separate thread or something, because it is an awaitable function. You have to run it inside of an async function. Or more like you have to await it inside of the async function. And yeah, technically I could create an async function in a separate thread and do that this way. Perhaps. But it then looses all its context and cannot send messages. Because apparently it needs to run within one of the @bot.listener event calls to make it work. To have the context necessary to send the message properly, or something. ↩ Reply

They do have the @bot.listener.on_startup call to bind some async code to the startup of the bot. Which gives me an option to start running something. And I can run a while loop that listens to WhatsApp inputs and sends messages over to Matrix. And it would work. ↩ Reply

But this while loop would completely block all other events. ↩ Reply

asyncio is not threading. ↩ Reply

I had to look into it and understand what the fuck asyncio even is. And thankfully I did something similar for Dani's Race the other day. ↩ Reply

In Dani's Race due to the depsgraph problem I have some stuff that happens in the game scheduled to be executed once there is enough depsgraph to execute the function. Instead of running the function, I pass it over to the scheduler that periodically checks if the conditions are favorable, and only if they are, it executes the function. ↩ Reply

asyncio does that for each line of async function code, or something. All awaiting async functions are scheduled to be executed at once. But they are not executing until one of the functions gives away the execution privileges to the other functions. If I run a while loop, it will never return nothing. All the other scheduled functions will just wait for their turn forever. ↩ Reply

By the end of Day 3 I figured out this code: ↩ Reply

@bot.listener.on_startup
async def on_startup_setuper(stuff):

    if not config.get("swl"):
        config["swl"] = True

        print("\n\nStarting WhatsApp to Matrix thread!!!\n\n")
        
        # THIS IS THE MAGIC SAUSE!!!
        asyncio.ensure_future(whatsapp_loop())




Where the whatsapp_loop() actually contains the while loop. And periodically it runs asyncio.sleep() ( a version of time.sleep() that returns privileges for some time ), and so now it sort of works. ↩ Reply

But there is another problem. ↩ Reply

Notice the print: ↩ Reply

print("\n\nStarting WhatsApp to Matrix thread!!!\n\n")



Two new lines in front. Two new lines in the back! Why? Well... because I don't know why, but the @bot.listener.on_startup thing doesn't work always. ↩ Reply

If I stop the bot and then immediately restart it, chances are, the @bot.listener.on_startup will not fire. And therefor I wont see the text. So the text is needed for me to know that everything started as needed. ↩ Reply

Conclusion


This is the state of my WhatsApp to Matrix bridge as of now. ↩ Reply

I think I have to do a few things to make it better: ↩ Reply

  • Make sure that it knows to restart itself if the@bot.listener.on_startup doesn't fire in say a minute after starting the bot. ↩ Reply


  • Implement some sort of auto-restart on failure. So if there is a bug somewhere it won't require me to manually restart it all the time. ↩ Reply
Please take a look at what I did. If there will be people struggling with it, maybe it might develop into something rather useful. ↩ Reply

Happy Hacking!!! c:3 ↩ Reply

[icon unlike] 1
[icon right]
[icon terminal]
[icon markdown]

Find this post on Mastodon

[avatar]  Troler c:0 October 08, 2026


WhatsApp, fucking WhatsApp. The app that everybody uses without thinking twice, that makes no sense being used in places that I have seen it being used. Fucking police officers share police-work-related stuff via WhatsApp groups for the entire user-data department of Meta ( and their data-brokers ) to see. This has to stop! WhatsApp has to be defeated!
⤴ View

But 'tis encrypted by Facebook servers, so it is secure!!!

[icon reply]
[avatar]  Troler c:1 October 08, 2026


In any case, working with WhatsApp directly didn't feel right. And the boss of the boss demanded me to take the store-phone home as if it is mine. But I'm not going to sit with an active Meta spy in my house. Are you fucking kidding me?
⤴ View

Also you self-host the website, so the Death (pun on Meta = מיתה) could see all the network traffic? That's just plain stupid.

[icon reply]
[avatar]  Troler c:2 October 08, 2026


Fuck asyncio!
⤴ View

This is why _threads (not threads) are better. The most supreme solution is to pass manual syscalls and create your own threads, but don't use fork, that will overcomplicate it.

[icon reply]
[avatar]  Troler c:3 October 08, 2026


Happy Hacking!!!
⤴ View

This time, the interjection makes sense.

[icon reply]
[icon question]











[icon articles]How I am fighting the WhatsApp monopoly

[thumbnail]

[avatar]  Blender Dumbass

👁 4 ❤ 1 💬 4



WhatsApp, fucking WhatsApp. The app that everybody uses without thinking twice, that makes no sense being used in places that I have seen it being used. Fucking police officers share police-work-related stuff via WhatsApp groups for the entire user-data department of Meta ( and their data-brokers ) to see. This has to stop! WhatsApp has to be defeated!

So I made a bridge.


#whatsapp #matrix #whatsapptomatrixbridge #bridge #freesoftware #opensource


[icon articles]We have to solve the money problem!

[thumbnail]

[avatar]  Blender Dumbass

👁 706 💬 7



On the Fireside Fedi interview with Jerry ( the admin of Infosec.Exchange Mastodon instance ) a scary truth was suddenly revealed ( on 34:11 ): Just to keep the instance up and running he needs to spend up to $5000 a month, pretty much out of his pocket. Donations to the instance barely cover any of that. And if he will ask people to pay to use it, they will, rightfully so, switch to a different instance.


#freedom #fediverse #freesoftware #finance #money #mastodon #webdev #programming #libreculture #libresoftware #opensource


[icon articles]"Open Source" vs "Free Software" the disagreement on Paternalism

[thumbnail]

[avatar]  Blender Dumbass

👁 49 ❤ 2 💬 3



Both "open source" and "free software" mean, in terms of software itself, largely the same thing. The source code is published. The project is developed by a community of people. The project is forkable. Many pieces of software are both "free software" and "open source" in the same time. But when you dig into the details of their definitions, you start to see differences.


#freesoftware #opensource #paternalism #richardstallman #rms #linustorvalds #gnu #linux #philosophy #enshittification


[icon articles]Did Petitions Fail? How AI ruined it? A new Fediverse gimmick?

[thumbnail]

[avatar]  Blender Dumbass

👁 30 ❤ 4 💬 6



Talking about why Petitions failed. And thinking up a new idea of how to gamify engagement on the Fediverse.


#fedi #fediverse #petition #gimick #programming #webdev #platform #development #freesoftware #opensource #API #ai #enshittification #activitypub


[icon articles]Why you should care about Dani's Race?

[thumbnail]

[avatar]  Blender Dumbass

👁 32 ❤ 3 🔄 1 💬 4



Dani's Race is a pretty to look at, open-world game. Is this a good enough reason to care about it? No. It's not. There are plenty of good looking games out there. And Dani's Race is not even close to some of them. Dani's Race is a Libre "GTA Clone". Okay... so what? It's not the only one. And it is not even that GTA-like anyway. Yes, you can get in and out of cars. Yes, you have an open world. Yes, the levels are structured into missions. But so what? Why should you give a damn? What's so special about this game in particular? Well...

Let's start with a square.



#danisrace #moriasrace #game #gamedev #freesoftware #blender3d #python #programming #gta #gta5 #gtav #gta6 #gtaiv #gtasa #gtavicecity #gta3 #stupertuxkart #libregaming #zeroad #supertux #tux #gnu #linux #gnulinux #opensource


[icon articles]Help Me Collect Financial Statistics Of The Libre Community

[thumbnail]

[avatar]  Blender Dumbass

👁 124 💬 1



If you are running a Libre project and / or know somebody who does. And that Libre project has a way for donations to come in. Please make the data about your financials accessible in a machine readable way.


#freedom #freesoftware #finance #money #donations #libre #opensource


[icon codeberg] Powered with BDServer [icon python] Plugins [icon theme] Themes [icon analytics] Analytics [icon email] Contact [icon mastodon] Mastodon
[icon unlock]