Allow room history to be visible

main
Charlotte Som 2021-10-12 19:11:24 +02:00
parent 037ff4fb23
commit 55f03b188f
1 changed files with 4 additions and 4 deletions

View File

@ -310,7 +310,7 @@ func (r *messagesReq) filterHistoryVisible(events []*gomatrixserverlib.HeaderedE
// user shouldn't see, we check the recent events and remove any prior to the join event of the user
// which is equiv to history_visibility: joined
joinEventIndex := -1
for i, ev := range events {
/* for i, ev := range events {
if ev.Type() == gomatrixserverlib.MRoomMember && ev.StateKeyEquals(r.device.UserID) {
membership, _ := ev.Membership()
if membership == "join" {
@ -318,7 +318,7 @@ func (r *messagesReq) filterHistoryVisible(events []*gomatrixserverlib.HeaderedE
break
}
}
}
} */
var result []*gomatrixserverlib.HeaderedEvent
var eventsToCheck []*gomatrixserverlib.HeaderedEvent
@ -381,10 +381,10 @@ func (r *messagesReq) filterHistoryVisible(events []*gomatrixserverlib.HeaderedE
break
}
}
if !wasJoined {
/* if !wasJoined {
util.GetLogger(r.ctx).WithField("num_events", len(events)).Warnf("%s was not joined to room during these events, omitting them", r.device.UserID)
return []*gomatrixserverlib.HeaderedEvent{}
}
} */
return result
}