mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 10:04:56 -04:00
Use the proper serialization format when bundling aggregations. (#12090)
This ensures that the `latest_event` field of the bundled aggregation for threads uses the same format as the other events in the response.
This commit is contained in:
parent
a511a890d7
commit
1d11b452b7
10 changed files with 130 additions and 143 deletions
|
@ -16,6 +16,7 @@ from synapse.api.constants import EventContentFields
|
|||
from synapse.api.room_versions import RoomVersions
|
||||
from synapse.events import make_event_from_dict
|
||||
from synapse.events.utils import (
|
||||
SerializeEventConfig,
|
||||
copy_power_levels_contents,
|
||||
prune_event,
|
||||
serialize_event,
|
||||
|
@ -392,7 +393,9 @@ class PruneEventTestCase(unittest.TestCase):
|
|||
|
||||
class SerializeEventTestCase(unittest.TestCase):
|
||||
def serialize(self, ev, fields):
|
||||
return serialize_event(ev, 1479807801915, only_event_fields=fields)
|
||||
return serialize_event(
|
||||
ev, 1479807801915, config=SerializeEventConfig(only_event_fields=fields)
|
||||
)
|
||||
|
||||
def test_event_fields_works_with_keys(self):
|
||||
self.assertEqual(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue