mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 00:13:51 +01:00
Merge pull request #59 from matrix-org/hotfixes-v0.6.1f
Hotfixes v0.6.1f
This commit is contained in:
commit
771892b314
3 changed files with 6 additions and 4 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
0.6.1e
|
0.6.1f
|
||||||
|
|
|
@ -16,4 +16,4 @@
|
||||||
""" This is a reference implementation of a synapse home server.
|
""" This is a reference implementation of a synapse home server.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "0.6.1e"
|
__version__ = "0.6.1f"
|
||||||
|
|
|
@ -45,12 +45,14 @@ def prune_event(event):
|
||||||
"membership",
|
"membership",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
event_dict = event.get_dict()
|
||||||
|
|
||||||
new_content = {}
|
new_content = {}
|
||||||
|
|
||||||
def add_fields(*fields):
|
def add_fields(*fields):
|
||||||
for field in fields:
|
for field in fields:
|
||||||
if field in event.content:
|
if field in event.content:
|
||||||
new_content[field] = event.content[field]
|
new_content[field] = event_dict["content"][field]
|
||||||
|
|
||||||
if event_type == EventTypes.Member:
|
if event_type == EventTypes.Member:
|
||||||
add_fields("membership")
|
add_fields("membership")
|
||||||
|
@ -75,7 +77,7 @@ def prune_event(event):
|
||||||
|
|
||||||
allowed_fields = {
|
allowed_fields = {
|
||||||
k: v
|
k: v
|
||||||
for k, v in event.get_dict().items()
|
for k, v in event_dict.items()
|
||||||
if k in allowed_keys
|
if k in allowed_keys
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue