From 85250211eab726f6a5885c734b10e008c7ff7f1b Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Wed, 22 Sep 2021 16:03:25 -0400 Subject: [PATCH] feat: add mailserver request signals --- src/app/profile/core.nim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/app/profile/core.nim b/src/app/profile/core.nim index 8a1693dae0..2d9b924575 100644 --- a/src/app/profile/core.nim +++ b/src/app/profile/core.nim @@ -123,6 +123,17 @@ proc init*(self: ProfileController, account: Account) = let mailserverArg = MailserverArgs(e) self.view.mailservers.activeMailserverChanged(mailserverArg.peer) + self.status.events.on(SignalType.HistoryRequestStarted.event) do(e: Args): + info "history request started", topics="mailserver-interaction" + + self.status.events.on(SignalType.HistoryRequestCompleted.event) do(e: Args): + info "history request completed", topics="mailserver-interaction" + + self.status.events.on(SignalType.HistoryRequestFailed.event) do(e: Args): + let h = HistoryRequestFailedSignal(e) + info "history request failed", topics="mailserver-interaction", errorMessage=h.errorMessage + + self.status.events.on(SignalType.Message.event) do(e: Args): let msgData = MessageSignal(e); if msgData.contacts.len > 0: