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

Bridge joins to whatsapp as invites using relaybot user #694

Open uumas opened 6 months ago

uumas commented 6 months ago

I have a room bridged to a whatsapp group with a relaybot. It works fine for users who are not logged into the bridge, but for users who are logged in and join the room in matrix, it gives the error "Your message may not have been bridged: failed to get group members: you're not participating in that group". I would except the bridge to either bridge their messages using the relaybot too or invite their whatsapp user to the whatsapp group.

This works correctly, if another user who is logged in to the bridge and can invite others to the whatsapp group invites the new matrix-user, but not if the matrix user joins the (public) room themselves or if a non-logged in user or a user without permissions to invite to whatsapp group invites them to the matrix room. In these cases, the relaybot should invite the user on whatsapp-side, assuming it has permission in whatsapp to do so.

uumas commented 6 months ago

possibly a better idea: Use the relaybot to get the group invite link on whatsapp and join the user with that

olmari commented 6 months ago

In general case it would be nice if bridge would handle this kind of case gracefully. There can be reasons an person doesn't really want to be in whatsapp side of the room (say, just in general to disliking WA and driving the point), then it would be nice that bridge would relay it normally instead erroring out. Anyway, +1 for this from me :)

SHABI220 commented 3 months ago

I need hacking tips