mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-10-31 20:08:55 +01:00
Default to backfilling all chats in history sync
This commit is contained in:
parent
8e4995cd70
commit
6e976fb3fc
2 changed files with 7 additions and 2 deletions
|
@ -174,7 +174,12 @@ func (hsc *HistorySyncConversation) Scan(row Scannable) *HistorySyncConversation
|
|||
}
|
||||
|
||||
func (hsq *HistorySyncQuery) GetNMostRecentConversations(userID id.UserID, n int) (conversations []*HistorySyncConversation) {
|
||||
rows, err := hsq.db.Query(getNMostRecentConversations, userID, n)
|
||||
nPtr := &n
|
||||
// Negative limit on SQLite means unlimited, but Postgres prefers a NULL limit.
|
||||
if n < 0 && hsq.db.dialect == "postgres" {
|
||||
nPtr = nil
|
||||
}
|
||||
rows, err := hsq.db.Query(getNMostRecentConversations, userID, nPtr)
|
||||
defer rows.Close()
|
||||
if err != nil || rows == nil {
|
||||
return nil
|
||||
|
|
|
@ -137,7 +137,7 @@ bridge:
|
|||
# Other conversations will be backfilled on demand when the start PM
|
||||
# provisioning endpoint is used or when a message comes in from that
|
||||
# chat.
|
||||
max_initial_conversations: 10
|
||||
max_initial_conversations: -1
|
||||
# Settings for immediate backfills. These backfills should generally be
|
||||
# small and their main purpose is to populate each of the initial chats
|
||||
# (as configured by max_initial_conversations) with a few messages so
|
||||
|
|
Loading…
Reference in a new issue