Changeset 409 in code for trunk/user.go


Ignore:
Timestamp:
Aug 20, 2020, 6:05:01 PM (5 years ago)
Author:
contact
Message:

Nuke in-memory ring buffer

Instead, always read chat history from logs. Unify the implicit chat
history (pushing history to clients) and explicit chat history
(via the CHATHISTORY command).

Instead of keeping track of ring buffer cursors for each client, use
message IDs.

If necessary, the ring buffer could be re-introduced behind a
common MessageStore interface (could be useful when on-disk logs are
disabled).

References: https://todo.sr.ht/~emersion/soju/80

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user.go

    r406 r409  
    5252
    5353type networkHistory struct {
    54         clients map[string]uint64 // indexed by client name
    55         ring    *Ring             // can be nil if there are no offline clients
     54        clients map[string]string // indexed by client name
    5655}
    5756
Note: See TracChangeset for help on using the changeset viewer.