Make logging output for state deletions a bit better

This commit is contained in:
Neil Alexander 2022-05-26 10:38:46 +01:00
parent 015465d496
commit 9eb4fec33b
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 13 additions and 5 deletions

View file

@ -210,6 +210,14 @@ func (s StateAtEventAndReferences) Swap(a, b int) {
s[a], s[b] = s[b], s[a]
}
func (s StateAtEventAndReferences) EventIDs() string {
strs := make([]string, 0, len(s))
for _, r := range s {
strs = append(strs, r.EventID)
}
return "[" + strings.Join(strs, " ") + "]"
}
// An Event is a gomatrixserverlib.Event with the numeric event ID attached.
// It is when performing bulk event lookup in the database.
type Event struct {