1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-01-06 00:25:39 +02:00

Chore: Delete multiple POP3 messages in single action

This commit is contained in:
Ralph Slooten 2024-06-19 16:02:40 +12:00
parent 710f093561
commit 70baf12adb

View File

@ -93,10 +93,10 @@ func handleClient(conn net.Conn) {
defer func() {
if state == UPDATE {
for _, id := range toDelete {
_ = storage.DeleteMessages([]string{id})
}
if len(toDelete) > 0 {
if err := storage.DeleteMessages(toDelete); err != nil {
logger.Log().Errorf("[pop3] error deleting: %s", err.Error())
}
// Update web UI to remove deleted messages
websockets.Broadcast("prune", nil)
}