mautrix / whatsapp

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

Bot seems to process also commands from a different control room #575

Closed jacotec closed 1 year ago

jacotec commented 1 year ago

I have seen an issue with the follwing scenario:

User 1 has a personal bridge room (and as a result a personal WhatsApp management room with the bot).

User "relay" is operating a relay bridge with a separate number, so that several people can answer and open chats with a common number. Therefore I have a node-red script which:

User 1 is member of the users in the WhatsApp management room of the relay user.

The scenario:

User1 now writes a message and I see that the chat does not (!) happen where it should (in the created global room by the relay user bridge), but only with his private phone number via his "own" bridge.

In the bridge logs I see that the bridge has invited user 1 two times: To a portal created by his private bridge and to the portal which my relay user has set up.

It appears that the private whatsapp bot of user 1 has "stolen" the "!wa pm" command which user 1 issues in a fully different room (the control room of the relay user).

The bot should not "steal" commands from the user in other control rooms and treat is as it would be in his own control room.

tulir commented 1 year ago

!wa commands are supposed to work in any room, unprefixed commands only work in the user's own management room.

You should probably use a different prefix for the relay management or forward them to a different room.