From eea1046366e70b70bf5e9dd49c230bec61ba46c9 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 4 Jun 2020 12:51:25 +0200 Subject: [PATCH] Fix (de)serialization for filter in get_context --- src/r0/context/get_context.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/r0/context/get_context.rs b/src/r0/context/get_context.rs index 37c88d00..14cdc610 100644 --- a/src/r0/context/get_context.rs +++ b/src/r0/context/get_context.rs @@ -35,7 +35,11 @@ ruma_api! { /// A RoomEventFilter to filter returned events with. #[ruma_api(query)] - #[serde(skip_serializing_if = "Option::is_none")] + #[serde( + with = "ruma_serde::json_string", + default, + skip_serializing_if = "Option::is_none" + )] pub filter: Option, }