mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 15:46:44 +00:00
GODT-1431 Do not cache message during new message event when CoD is off.
This commit is contained in:
@ -27,6 +27,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ProtonMail/gopenpgp/v2/crypto"
|
"github.com/ProtonMail/gopenpgp/v2/crypto"
|
||||||
|
"github.com/ProtonMail/proton-bridge/internal/store/cache"
|
||||||
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
@ -303,8 +304,10 @@ func (store *Store) createOrUpdateMessagesEvent(msgs []*pmapi.Message) error { /
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Notify the cacher that it should start caching messages.
|
// Notify the cacher that it should start caching messages.
|
||||||
for _, msg := range msgs {
|
if cache.IsOnDiskCache(store.cache) {
|
||||||
store.msgCachePool.newJob(msg.ID)
|
for _, msg := range msgs {
|
||||||
|
store.msgCachePool.newJob(msg.ID)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user