mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Fix panic in federationsender consumer
This commit is contained in:
parent
58b831ad36
commit
ddbef7c3ff
1 changed files with 6 additions and 0 deletions
|
@ -95,6 +95,12 @@ func (t *KeyChangeConsumer) onMessage(msg *sarama.ConsumerMessage) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *KeyChangeConsumer) onDeviceKeyMessage(m api.DeviceMessage) error {
|
func (t *KeyChangeConsumer) onDeviceKeyMessage(m api.DeviceMessage) error {
|
||||||
|
if m.DeviceKeys == nil && m.OutputCrossSigningKeyUpdate == nil {
|
||||||
|
// This probably shouldn't happen but stops us from panicking if we come
|
||||||
|
// across an update that doesn't satisfy either types.
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
logger := logrus.WithField("user_id", m.UserID)
|
logger := logrus.WithField("user_id", m.UserID)
|
||||||
|
|
||||||
// only send key change events which originated from us
|
// only send key change events which originated from us
|
||||||
|
|
Loading…
Reference in a new issue