We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aabb2ac commit 6e44691Copy full SHA for 6e44691
internal/storage/search.go
@@ -13,6 +13,7 @@ import (
13
"github.com/araddon/dateparse"
14
"github.com/axllent/mailpit/internal/logger"
15
"github.com/axllent/mailpit/internal/tools"
16
+ "github.com/axllent/mailpit/server/websockets"
17
"github.com/leporo/sqlf"
18
)
19
@@ -201,6 +202,18 @@ func DeleteSearch(search, timezone string) error {
201
202
203
dbLastAction = time.Now()
204
205
+ // broadcast changes
206
+ if len(ids) > 200 {
207
+ websockets.Broadcast("prune", nil)
208
+ } else {
209
+ for _, id := range ids {
210
+ d := struct {
211
+ ID string
212
+ }{ID: id}
213
+ websockets.Broadcast("delete", d)
214
+ }
215
216
+
217
addDeletedSize(int64(deleteSize))
218
219
logMessagesDeleted(total)
0 commit comments