Skip to content

Commit 19b634d

Browse files
Added archival sockets
1 parent 1401370 commit 19b634d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

internal/session/socket.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,16 @@ func (m *Manager) handleWebSocketCommands(conn *websocket.Conn, username, sessio
5555
if err := m.sendCurrentUserTransactions(conn, username, sessionID, 100); err != nil {
5656
m.errCh <- fmt.Errorf("failed to send current list of transactions on command: %w", err)
5757
}
58-
case CtxStreamAllSessions:
59-
/* push all sessions */
60-
case CtxStreamAllTransactions:
61-
/* push all transactions */
58+
case CtxStreamUserArchiveSession:
59+
/* push archived sessions */
60+
if err := m.sendCurrentArchivedSessions(conn, username, 1, 1); err != nil {
61+
m.errCh <- fmt.Errorf("failed to send archived sessions list on command: %w", err)
62+
}
63+
case CtxStreamUserArchivePendingTransactions:
64+
/* push archived pending transactions */
65+
if err := m.sendCurrentArchivedPendingTransactions(conn, username, 1, 1); err != nil {
66+
m.errCh <- fmt.Errorf("failed to send archived pending transactions on command: %w", err)
67+
}
6268
}
6369
}
6470
}

0 commit comments

Comments
 (0)