Эх сурвалжийг харах

Allow using custom puppet for backfilling

Tulir Asokan 5 жил өмнө
parent
commit
c0fc06b410
1 өөрчлөгдсөн 3 нэмэгдсэн , 1 устгасан
  1. 3 1
      puppet.go

+ 3 - 1
puppet.go

@@ -161,7 +161,9 @@ func (puppet *Puppet) PhoneNumber() string {
 }
 
 func (puppet *Puppet) IntentFor(portal *Portal) *appservice.IntentAPI {
-	if (!portal.IsPrivateChat() && puppet.customIntent == nil) || portal.backfilling || portal.Key.JID == puppet.JID {
+	if (!portal.IsPrivateChat() && puppet.customIntent == nil) ||
+		(portal.backfilling && portal.bridge.Config.Bridge.InviteOwnPuppetForBackfilling) ||
+		portal.Key.JID == puppet.JID {
 		return puppet.DefaultIntent()
 	}
 	return puppet.customIntent