@@ 36,6 36,12 @@ func NewTallyardSyncer() *TallyardSyncer {
}
func (s *TallyardSyncer) GetFilterJSON(userID id.UserID) *mautrix.Filter {
+ stateEvtTypes := []event.Type{
+ event.StateCreate,
+ event.StateEncryption,
+ event.StateMember,
+ event.StateRoomName,
+ }
return &mautrix.Filter{
AccountData: mautrix.FilterPart{
NotTypes: []event.Type{event.NewEventType("*")},
@@ 51,24 57,20 @@ func (s *TallyardSyncer) GetFilterJSON(userID id.UserID) *mautrix.Filter {
NotTypes: []event.Type{event.NewEventType("*")},
},
State: mautrix.FilterPart{
- Types: []event.Type{
- event.StateCreate,
- event.StateEncryption,
- event.StateMember,
- event.StateRoomName,
- },
+ Types: stateEvtTypes,
},
Timeline: mautrix.FilterPart{
// TODO figure out how to have no limit; -1 is giving me 500s
Limit: 500,
- Types: []event.Type{
+ Types: append(
+ stateEvtTypes,
election.CreateElectionMessage,
election.JoinElectionMessage,
election.StartElectionMessage,
election.KeysMessage,
election.EvalsMessage,
election.SumMessage,
- },
+ ),
},
},
}