mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-28 17:23:09 -06:00
Base64 not hex
This commit is contained in:
parent
5fa9a4f270
commit
e6cb984c14
|
|
@ -3,7 +3,7 @@ package streams
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"encoding/hex"
|
"encoding/base64"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -64,7 +64,7 @@ func (p *InviteStreamProvider) IncrementalSync(
|
||||||
h := sha256.Sum256(append([]byte(roomID), []byte(strconv.FormatInt(int64(to), 10))...))
|
h := sha256.Sum256(append([]byte(roomID), []byte(strconv.FormatInt(int64(to), 10))...))
|
||||||
lr.Timeline.Events = append(lr.Timeline.Events, gomatrixserverlib.ClientEvent{
|
lr.Timeline.Events = append(lr.Timeline.Events, gomatrixserverlib.ClientEvent{
|
||||||
// fake event ID which muxes in the to position
|
// fake event ID which muxes in the to position
|
||||||
EventID: "$" + hex.EncodeToString(h[:]),
|
EventID: "$" + base64.RawURLEncoding.EncodeToString(h[:]),
|
||||||
OriginServerTS: gomatrixserverlib.AsTimestamp(time.Now()),
|
OriginServerTS: gomatrixserverlib.AsTimestamp(time.Now()),
|
||||||
RoomID: roomID,
|
RoomID: roomID,
|
||||||
Sender: req.Device.UserID,
|
Sender: req.Device.UserID,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue