Add some more wakeups

This commit is contained in:
Neil Alexander 2021-01-06 15:36:53 +00:00
parent 2eb4efca44
commit af332f24ae
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 9 additions and 17 deletions

View file

@ -97,13 +97,7 @@ func (s *OutputSendToDeviceEventConsumer) onMessage(msg *sarama.ConsumerMessage)
return err
}
//s.notifier.OnNewSendToDevice(
// output.UserID,
// []string{output.DeviceID},
// types.StreamingToken{SendToDevicePosition: streamPos},
//)
_ = streamPos
s.db.SendToDeviceStream().Advance(streamPos)
return nil
}

View file

@ -110,14 +110,12 @@ func (s *OutputKeyChangeEventConsumer) onMessage(msg *sarama.ConsumerMessage) er
}
// make sure we get our own key updates too!
queryRes.UserIDsToCount[output.UserID] = 1
posUpdate := types.StreamingToken{
DeviceListPosition: types.LogPosition{
Offset: msg.Offset,
Partition: msg.Partition,
},
posUpdate := types.LogPosition{
Offset: msg.Offset,
Partition: msg.Partition,
}
_ = posUpdate
s.db.DeviceListStream().Advance(posUpdate)
//for userID := range queryRes.UserIDsToCount {
// s.notifier.OnNewKeyChange(posUpdate, userID, output.UserID)

View file

@ -271,8 +271,8 @@ func (s *OutputRoomEventConsumer) onNewInviteEvent(
return nil
}
_ = pduPos
//s.notifier.OnNewInvite(types.StreamingToken{InvitePosition: pduPos}, *msg.Event.StateKey())
s.db.InviteStream().Advance(pduPos)
return nil
}
@ -291,8 +291,8 @@ func (s *OutputRoomEventConsumer) onRetireInviteEvent(
// Notify any active sync requests that the invite has been retired.
// Invites share the same stream counter as PDUs
_ = pduPos
//s.notifier.OnNewInvite(types.StreamingToken{InvitePosition: pduPos}, msg.TargetUserID)
s.db.InviteStream().Advance(pduPos)
return nil
}