diff --git a/src/github.com/matrix-org/dendrite/roomserver/api/input.go b/src/github.com/matrix-org/dendrite/roomserver/api/input.go index 366541af5..bfa4a9d58 100644 --- a/src/github.com/matrix-org/dendrite/roomserver/api/input.go +++ b/src/github.com/matrix-org/dendrite/roomserver/api/input.go @@ -23,6 +23,7 @@ const ( ) // InputRoomEvent is a matrix room event to add to the room server database. +// TODO: Implement UnmarshalJSON/MarshalJSON in a way that does something sensible with the event JSON. type InputRoomEvent struct { // Whether this event is new, backfilled or an outlier. // This controls how the event is processed. diff --git a/src/github.com/matrix-org/dendrite/roomserver/input/consumer.go b/src/github.com/matrix-org/dendrite/roomserver/input/consumer.go index 9a5cb668d..922653724 100644 --- a/src/github.com/matrix-org/dendrite/roomserver/input/consumer.go +++ b/src/github.com/matrix-org/dendrite/roomserver/input/consumer.go @@ -91,7 +91,7 @@ func (c *Consumer) consumePartition(pc sarama.PartitionConsumer) { defer pc.Close() for message := range pc.Messages() { var input api.InputRoomEvent - if err := json.Unmarshal(message.Value, &message.Value); err != nil { + if err := json.Unmarshal(message.Value, &input); err != nil { c.logError(message, err) } else { if err := processRoomEvent(c.DB, input); err != nil {