Changeset 781 in code for trunk/user.go


Ignore:
Timestamp:
Feb 11, 2022, 6:41:46 PM (3 years ago)
Author:
delthas
Message:

Add support for the wip soju.im/read capability and READ command

READ lets downstream clients share information between each other about
what messages have been read by other downstreams.

Each target/entity has an optional corresponding read receipt, which is
stored as a timestamp.

  • When a downstream sends: READ #chan timestamp=2020-01-01T01:23:45.000Z the read receipt for that target is set to that date
  • soju sends READ to downstreams:
    • on JOIN, if the client uses the soju.im/read capability
    • when the read receipt timestamp is set by any downstream

The read receipt date is clamped by the previous receipt date and the
current time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user.go

    r777 r781  
    304304}
    305305
    306 func (net *network) attach(ch *Channel) {
     306func (net *network) attach(ctx context.Context, ch *Channel) {
    307307        if !ch.Detached {
    308308                return
     
    330330
    331331                if uch != nil {
    332                         forwardChannel(dc, uch)
     332                        forwardChannel(ctx, dc, uch)
    333333                }
    334334
    335335                if detachedMsgID != "" {
    336                         dc.sendTargetBacklog(context.TODO(), net, ch.Name, detachedMsgID)
     336                        dc.sendTargetBacklog(ctx, net, ch.Name, detachedMsgID)
    337337                }
    338338        })
Note: See TracChangeset for help on using the changeset viewer.