mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 06:53:09 -06:00
Fix typo and add TODO
This commit is contained in:
parent
9d0b3dc0ee
commit
68a212f5ef
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue