From a3ba1e3826ff7f768907b0bc06cc13ef1272d123 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 28 Feb 2022 23:59:05 +0200 Subject: [PATCH] Remove dummy state event in history sync It's not needed anymore as the relevant PR was merged, and Synapse 1.53 seems to include a regression which breaks sending non-member state events (which seems to be fixed by matrix-org/synapse#12083). --- historysync.go | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/historysync.go b/historysync.go index 387c93a2..c4079bc5 100644 --- a/historysync.go +++ b/historysync.go @@ -321,20 +321,8 @@ func (portal *Portal) backfill(source *User, messages []*waProto.WebMessageInfo) firstMsgTimestamp := time.Unix(int64(messages[len(messages)-1].GetMessageTimestamp()), 0) - historyBatch.StateEventsAtStart = make([]*event.Event, 1) - newBatch.StateEventsAtStart = make([]*event.Event, 1) - - // TODO remove the dummy state events after https://github.com/matrix-org/synapse/pull/11188 - emptyStr := "" - dummyStateEvent := event.Event{ - Type: BackfillDummyStateEvent, - Sender: portal.MainIntent().UserID, - StateKey: &emptyStr, - Timestamp: firstMsgTimestamp.UnixMilli(), - Content: event.Content{}, - } - historyBatch.StateEventsAtStart[0] = &dummyStateEvent - newBatch.StateEventsAtStart[0] = &dummyStateEvent + historyBatch.StateEventsAtStart = make([]*event.Event, 0) + newBatch.StateEventsAtStart = make([]*event.Event, 0) addedMembers := make(map[id.UserID]*event.MemberEventContent) addMember := func(puppet *Puppet) {