Bladeren bron

Fix function name

Tulir Asokan 2 jaren geleden
bovenliggende
commit
1ee0841add
2 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 1 1
      database/historysync.go
  2. 2 2
      historysync.go

+ 1 - 1
database/historysync.go

@@ -166,7 +166,7 @@ func (hsc *HistorySyncConversation) Scan(row dbutil.Scannable) *HistorySyncConve
 	return hsc
 }
 
-func (hsq *HistorySyncQuery) GetNMostRecentConversations(userID id.UserID, n int) (conversations []*HistorySyncConversation) {
+func (hsq *HistorySyncQuery) GetRecentConversations(userID id.UserID, n int) (conversations []*HistorySyncConversation) {
 	nPtr := &n
 	// Negative limit on SQLite means unlimited, but Postgres prefers a NULL limit.
 	if n < 0 && hsq.db.Dialect == dbutil.Postgres {

+ 2 - 2
historysync.go

@@ -108,7 +108,7 @@ func (user *User) handleHistorySyncsLoop() {
 const EnqueueBackfillsDelay = 30 * time.Second
 
 func (user *User) enqueueAllBackfills() {
-	nMostRecent := user.bridge.DB.HistorySync.GetNMostRecentConversations(user.MXID, user.bridge.Config.Bridge.HistorySync.MaxInitialConversations)
+	nMostRecent := user.bridge.DB.HistorySync.GetRecentConversations(user.MXID, user.bridge.Config.Bridge.HistorySync.MaxInitialConversations)
 	if len(nMostRecent) > 0 {
 		user.log.Infofln("%v has passed since the last history sync blob, enqueueing backfills for %d chats", EnqueueBackfillsDelay, len(nMostRecent))
 		// Find the portals for all the conversations.
@@ -132,7 +132,7 @@ func (user *User) enqueueAllBackfills() {
 }
 
 func (user *User) backfillAll() {
-	conversations := user.bridge.DB.HistorySync.GetNMostRecentConversations(user.MXID, -1)
+	conversations := user.bridge.DB.HistorySync.GetRecentConversations(user.MXID, -1)
 	if len(conversations) > 0 {
 		user.zlog.Info().
 			Int("conversation_count", len(conversations)).