Include event IDs on stripped state

This commit is contained in:
2025-10-26 15:56:46 -04:00
parent 8999a5e414
commit ad4c5cc5d2

View File

@@ -396,10 +396,17 @@ def strip_state(state_events) -> list:
new_list.append(d) new_list.append(d)
continue continue
if "room_id" in d:
ver = int(room_version_from_id(d["room_id"]))
else:
ver = 4
event_id = make_ref_hash(d, ver)
new_dict = {} new_dict = {}
for k, v in d.items(): for k, v in d.items():
if k in keys_to_remove: if k in keys_to_remove:
continue continue
new_dict[k] = strip_state(v) new_dict[k] = strip_state(v)
new_dict["event_id"] = event_id
new_list.append(new_dict) new_list.append(new_dict)
return new_list return new_list