From c0fc06b410cd927120e520641918156ccdd7d2d9 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 21 May 2020 20:00:00 +0300 Subject: [PATCH] Allow using custom puppet for backfilling --- puppet.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/puppet.go b/puppet.go index 4831c3d..9e496a4 100644 --- a/puppet.go +++ b/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