Try jsoniter in gmsl

This commit is contained in:
Neil Alexander 2021-01-25 15:04:01 +00:00
parent ef9d5ad4fe
commit 98dfaf3856
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
8 changed files with 26 additions and 18 deletions

View file

@ -20,6 +20,7 @@ import (
"fmt"
"github.com/Shopify/sarama"
jsoniter "github.com/json-iterator/go"
"github.com/matrix-org/dendrite/eduserver/api"
"github.com/matrix-org/dendrite/federationsender/queue"
"github.com/matrix-org/dendrite/federationsender/storage"
@ -131,7 +132,7 @@ func (t *OutputEDUConsumer) onSendToDeviceEvent(msg *sarama.ConsumerMessage) err
Sender: ote.Sender,
Type: ote.Type,
MessageID: util.RandomString(32),
Messages: map[string]map[string]json.RawMessage{
Messages: map[string]map[string]jsoniter.RawMessage{
ote.UserID: {
ote.DeviceID: ote.Content,
},