mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
Fix NewStreamTokenFromString
This commit is contained in:
parent
8ee18cd122
commit
b01b9180d0
|
|
@ -284,7 +284,7 @@ func NewStreamTokenFromString(tok string) (token StreamingToken, err error) {
|
|||
// s478_0_0_0_0_13.dl-0-2 but we have now removed partitioned stream positions
|
||||
tok = strings.Split(tok, ".")[0]
|
||||
parts := strings.Split(tok[1:], "_")
|
||||
var positions [7]StreamPosition
|
||||
var positions [8]StreamPosition
|
||||
for i, p := range parts {
|
||||
if i > len(positions) {
|
||||
break
|
||||
|
|
@ -305,6 +305,7 @@ func NewStreamTokenFromString(tok string) (token StreamingToken, err error) {
|
|||
InvitePosition: positions[4],
|
||||
AccountDataPosition: positions[5],
|
||||
DeviceListPosition: positions[6],
|
||||
NotificationDataPosition: positions[7],
|
||||
}
|
||||
return token, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue