mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-23 17:23:55 +00:00
Expand clone_event docstring
This commit is contained in:
1 parent
8fd10e4143
commit
a427fb3fe2
1 file changed
+6
-1
@@ -99,7 +99,12 @@ def prune_event(event: EventBase) -> EventBase:
|
||||
|
||||
|
||||
def clone_event(event: EventBase) -> EventBase:
|
||||
"""Take a copy of the event."""
|
||||
"""Take a copy of the event.
|
||||
|
||||
Most fields of the event are immutable, however fields such as `unsigned`,
|
||||
`signatures` and `internal_metadata` are mutable. Cloning the event allows
|
||||
us to edit such fields without affecting the original event.
|
||||
"""
|
||||
|
||||
return event.deep_copy()
|
||||
|
||||
|
||||
Reference in new issue
Block a user