Disable double puppeting in broadcast rooms. Fixes #506

(also fixes #371)
This commit is contained in:
Tulir Asokan 2022-05-29 19:17:29 +03:00
parent 1bfed718fe
commit 87b5c91fe7

View file

@ -204,7 +204,7 @@ type Puppet struct {
}
func (puppet *Puppet) IntentFor(portal *Portal) *appservice.IntentAPI {
if puppet.customIntent == nil || portal.Key.JID == puppet.JID {
if puppet.customIntent == nil || portal.Key.JID == puppet.JID || (portal.Key.JID.Server == types.BroadcastServer && portal.Key.Receiver != puppet.JID) {
return puppet.DefaultIntent()
}
return puppet.customIntent