Allow room history to be visible
parent
037ff4fb23
commit
55f03b188f
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue