This commit is contained in:
Kegan Dougal 2022-01-19 18:02:34 +00:00
parent 43f56a45a5
commit 31f1810814

View file

@ -118,15 +118,15 @@ func (s *OutputKeyChangeEventConsumer) onMessage(msg *sarama.ConsumerMessage) er
} }
switch m.Type { switch m.Type {
case api.TypeCrossSigningUpdate: case api.TypeCrossSigningUpdate:
return s.onCrossSigningMessage(m, msg.Offset, msg.Partition) return s.onCrossSigningMessage(m, msg.Offset)
case api.TypeDeviceKeyUpdate: case api.TypeDeviceKeyUpdate:
fallthrough fallthrough
default: default:
return s.onDeviceKeyMessage(m, msg.Offset, msg.Partition) return s.onDeviceKeyMessage(m, msg.Offset)
} }
} }
func (s *OutputKeyChangeEventConsumer) onDeviceKeyMessage(m api.DeviceMessage, offset int64, partition int32) error { func (s *OutputKeyChangeEventConsumer) onDeviceKeyMessage(m api.DeviceMessage, offset int64) error {
if m.DeviceKeys == nil { if m.DeviceKeys == nil {
return nil return nil
} }
@ -153,7 +153,7 @@ func (s *OutputKeyChangeEventConsumer) onDeviceKeyMessage(m api.DeviceMessage, o
return nil return nil
} }
func (s *OutputKeyChangeEventConsumer) onCrossSigningMessage(m api.DeviceMessage, offset int64, partition int32) error { func (s *OutputKeyChangeEventConsumer) onCrossSigningMessage(m api.DeviceMessage, offset int64) error {
output := m.CrossSigningKeyUpdate output := m.CrossSigningKeyUpdate
// work out who we need to notify about the new key // work out who we need to notify about the new key
var queryRes roomserverAPI.QuerySharedUsersResponse var queryRes roomserverAPI.QuerySharedUsersResponse