From 96b46846473935aef4bb8003a7500e259f64b97f Mon Sep 17 00:00:00 2001 From: Samuel Hawksby-Robinson Date: Sun, 2 Jun 2024 18:52:39 +0100 Subject: [PATCH] chore(no-torrent)_: removed TorrentManager from handleImportedMessages --- protocol/messenger.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/protocol/messenger.go b/protocol/messenger.go index dd7db8d74..0d02479cc 100644 --- a/protocol/messenger.go +++ b/protocol/messenger.go @@ -3743,11 +3743,11 @@ func (m *Messenger) handleImportedMessages(messagesToHandle map[transport.Filter importMessagesToSave := messageState.Response.DiscordMessages() if len(importMessagesToSave) > 0 { - m.torrentManager.LogStdout(fmt.Sprintf("saving %d discord messages", len(importMessagesToSave))) + m.logger.Debug(fmt.Sprintf("saving %d discord messages", len(importMessagesToSave))) m.handleImportMessagesMutex.Lock() err := m.persistence.SaveDiscordMessages(importMessagesToSave) if err != nil { - m.torrentManager.LogStdout("failed to save discord messages", zap.Error(err)) + m.logger.Debug("failed to save discord messages", zap.Error(err)) m.handleImportMessagesMutex.Unlock() return err } @@ -3756,11 +3756,11 @@ func (m *Messenger) handleImportedMessages(messagesToHandle map[transport.Filter messageAttachmentsToSave := messageState.Response.DiscordMessageAttachments() if len(messageAttachmentsToSave) > 0 { - m.torrentManager.LogStdout(fmt.Sprintf("saving %d discord message attachments", len(messageAttachmentsToSave))) + m.logger.Debug(fmt.Sprintf("saving %d discord message attachments", len(messageAttachmentsToSave))) m.handleImportMessagesMutex.Lock() err := m.persistence.SaveDiscordMessageAttachments(messageAttachmentsToSave) if err != nil { - m.torrentManager.LogStdout("failed to save discord message attachments", zap.Error(err)) + m.logger.Debug("failed to save discord message attachments", zap.Error(err)) m.handleImportMessagesMutex.Unlock() return err } @@ -3769,7 +3769,7 @@ func (m *Messenger) handleImportedMessages(messagesToHandle map[transport.Filter messagesToSave := messageState.Response.Messages() if len(messagesToSave) > 0 { - m.torrentManager.LogStdout(fmt.Sprintf("saving %d app messages", len(messagesToSave))) + m.logger.Debug(fmt.Sprintf("saving %d app messages", len(messagesToSave))) m.handleMessagesMutex.Lock() err := m.SaveMessages(messagesToSave) if err != nil {