mirror of
https://git.mills.io/saltyim/saltyim.git
synced 2024-06-20 13:58:22 +00:00
Fix inbox indexing (#125)
Co-authored-by: James Mills <prologic@shortcircuit.net.au> Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/125
This commit is contained in:
parent
c2119ad43f
commit
8a7fb8686c
@ -298,7 +298,9 @@ func (cli *Client) Subscribe(ctx context.Context, extraenvs, prehook, posthook s
|
||||
bus := msgbus_client.NewClient(uri, nil)
|
||||
|
||||
msgs := make(chan Message)
|
||||
s := bus.Subscribe(inbox, cli.state.GetIndex(inbox), cli.messageHandler(extraenvs, prehook, posthook, msgs))
|
||||
index := cli.state.GetIndex("inbox/"+inbox) + 1 // +1 to skip over the last seen message
|
||||
log.Debugf("streaming inbox %s from %d ...", inbox, index)
|
||||
s := bus.Subscribe(inbox, index, cli.messageHandler(extraenvs, prehook, posthook, msgs))
|
||||
s.Start()
|
||||
|
||||
log.Debugf("Connected to %s/%s", uri, inbox)
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7754bb3b5530d2f68548c1faf637cee918cdba3cfdc663937d79d875b6814a53
|
||||
size 28571339
|
||||
oid sha256:dd33c8166e24934aa8fb5e75d47fae78adfe88acb6596df56fe8f5b078900b9e
|
||||
size 28571927
|
||||
|
Loading…
Reference in New Issue
Block a user