From e6cb984c1426a76b4acaddc955db2fda0a7867ef Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 14 Jul 2021 10:16:58 +0100 Subject: [PATCH] Base64 not hex --- syncapi/streams/stream_invite.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syncapi/streams/stream_invite.go b/syncapi/streams/stream_invite.go index baaac8a2b..70374c6a7 100644 --- a/syncapi/streams/stream_invite.go +++ b/syncapi/streams/stream_invite.go @@ -3,7 +3,7 @@ package streams import ( "context" "crypto/sha256" - "encoding/hex" + "encoding/base64" "strconv" "time" @@ -64,7 +64,7 @@ func (p *InviteStreamProvider) IncrementalSync( h := sha256.Sum256(append([]byte(roomID), []byte(strconv.FormatInt(int64(to), 10))...)) lr.Timeline.Events = append(lr.Timeline.Events, gomatrixserverlib.ClientEvent{ // fake event ID which muxes in the to position - EventID: "$" + hex.EncodeToString(h[:]), + EventID: "$" + base64.RawURLEncoding.EncodeToString(h[:]), OriginServerTS: gomatrixserverlib.AsTimestamp(time.Now()), RoomID: roomID, Sender: req.Device.UserID,