mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-11-16 06:52:00 +01:00
Maybe fix backfilling when double puppeting isn't enabled at all
This commit is contained in:
parent
a2bdb84414
commit
95453a4748
1 changed files with 1 additions and 2 deletions
|
@ -394,14 +394,13 @@ func (portal *Portal) backfill(source *User, messages []*waProto.WebMessageInfo)
|
||||||
intent := puppet.IntentFor(portal)
|
intent := puppet.IntentFor(portal)
|
||||||
if intent.IsCustomPuppet && !portal.bridge.Config.CanDoublePuppetBackfill(puppet.CustomMXID) {
|
if intent.IsCustomPuppet && !portal.bridge.Config.CanDoublePuppetBackfill(puppet.CustomMXID) {
|
||||||
intent = puppet.DefaultIntent()
|
intent = puppet.DefaultIntent()
|
||||||
addMember(puppet)
|
|
||||||
}
|
}
|
||||||
converted := portal.convertMessage(intent, source, info, webMsg.GetMessage())
|
converted := portal.convertMessage(intent, source, info, webMsg.GetMessage())
|
||||||
if converted == nil {
|
if converted == nil {
|
||||||
portal.log.Debugfln("Skipping unsupported message %s in backfill", info.ID)
|
portal.log.Debugfln("Skipping unsupported message %s in backfill", info.ID)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if history && !portal.IsPrivateChat() && !intent.IsCustomPuppet && !portal.bridge.StateStore.IsInRoom(portal.MXID, puppet.MXID) {
|
if !intent.IsCustomPuppet && !portal.bridge.StateStore.IsInRoom(portal.MXID, puppet.MXID) {
|
||||||
addMember(puppet)
|
addMember(puppet)
|
||||||
}
|
}
|
||||||
// TODO this won't work for history
|
// TODO this won't work for history
|
||||||
|
|
Loading…
Reference in a new issue