Remove dead code

Use key for timestamp
This commit is contained in:
Till Faelligen 2020-10-18 11:30:29 +02:00
parent 1a10566f28
commit 9e3dff34fb
2 changed files with 1 additions and 8 deletions

View file

@ -189,13 +189,6 @@ func (t *OutputEDUConsumer) onTypingEvent(msg *sarama.ConsumerMessage) error {
return t.queues.SendEDU(edu, t.ServerName, names)
}
type userData struct {
Data struct {
Ts gomatrixserverlib.Timestamp `json:"ts"`
} `json:"data"`
EventIds []string `json:"event_ids"`
}
// onReceiptEvent is called in response to a message received on the receipt
// events topic from the EDU server.
func (t *OutputEDUConsumer) onReceiptEvent(msg *sarama.ConsumerMessage) error {

View file

@ -604,7 +604,7 @@ func (d *Database) addReceiptDeltaToResponse(
User: make(map[string]eduAPI.ReceiptTS),
}
for _, receipt := range receipts {
read.User[receipt.UserID] = eduAPI.ReceiptTS{receipt.Timestamp}
read.User[receipt.UserID] = eduAPI.ReceiptTS{TS: receipt.Timestamp}
content[receipt.EventID] = read
}
ev.Content, err = json.Marshal(content)