mautrix / whatsapp

A Matrix-WhatsApp puppeting bridge
https://maunium.net/go/mautrix-whatsapp
GNU Affero General Public License v3.0
1.21k stars 170 forks source link

Make bridge not invite to archived chats #674

Open Haui1112 opened 7 months ago

Haui1112 commented 7 months ago

Hi folks,

I just installed the whatsapp bridge (after using the discord bridge for longer, works great btw) and got 300+ invites. 10 of those were active whatsapp chats, the rest was archived crap. The bot also added 57 pages of users to my userlist (which were like 20 before) just because I did "login +phonenumber". Now I can't decline the 300 invites at once and get rate limited every 10 declines roughly...

Please change this.

Bug Bridge copies the entire chat list from whatsapp and recreates all chats and users and sends invites to every single one

Steps to recreate

  1. Install bridge with provided docker compose file https://docs.mau.fi/bridges/general/docker-setup.html?bridge=whatsapp
  2. Configure bridge for homeserver
  3. Restart bridge, then homeserver
  4. Open Chat with bot
  5. type "login {phonenumber}"
  6. get hundreds of invites (depending on the amount of chats you have)

Expected behavior

tulir commented 7 months ago

The number of chats to sync initially can be configured: https://github.com/mautrix/whatsapp/blob/master/example-config.yaml#L135-L137. The default is not going to be changed as most people expect all chats to be synced, but an option to not sync archived chats automatically may be reasonable.

Double puppeting is also recommended to auto-accept invites https://docs.mau.fi/bridges/general/double-puppeting.html

Haui1112 commented 7 months ago

The main problem that I'm seeing is that the different behaviors between bridges are inconsistent. I just installed mautrix-signalgo and it doesnt auto sync all chats.

While I thank you for mentioning the initial chat sync number, I would suggest that all bridges behave the same at login: No auto sync without prompt

tulir commented 7 months ago

The default config in all bridges is to auto sync on login. Signal just doesn't support syncing anything, it would sync everything if it was possible. Discord guilds are often big and not useful, so they're not synced, but discord DMs are synced automatically.

Haui1112 commented 6 months ago

Ok, thanks for elaborating. Though I think there should be a warning that potentially 100s (400 in my case) of rooms and users (600 in my case) can come from one single whatsapp login. I consider this unintended from my personal view. Consider someone running this on a slow computer and 10 friends who all login through the bridges and spam the server with new rooms and users.

Also, why is it a problem to make the bridges sync on prompt instead of login? If I log in, rooms sync with activity, if I want them all synced I can say so.

niebloomj commented 4 months ago

As a user, I definitely want to sync archived chats automatically.