From 9631cea83a24e1159201adf635eee9d1f029822b Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Tue, 1 Jun 2021 12:51:17 +0200 Subject: [PATCH] feat: Add toJson method for StoredInboundGroupSession --- .../utils/stored_inbound_group_session.dart | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/encryption/utils/stored_inbound_group_session.dart b/lib/encryption/utils/stored_inbound_group_session.dart index a74af3b9..71c821d6 100644 --- a/lib/encryption/utils/stored_inbound_group_session.dart +++ b/lib/encryption/utils/stored_inbound_group_session.dart @@ -54,4 +54,17 @@ class StoredInboundGroupSession { senderKey: json['sender_key'], senderClaimedKeys: json['sender_claimed_keys'], ); + + Map toJson() => { + 'client_id': clientId, + 'room_id': roomId, + 'session_id': sessionId, + 'pickle': pickle, + 'content': content, + 'indexes': indexes, + 'allowed_at_index': allowedAtIndex, + 'uploaded': uploaded, + 'sender_key': senderKey, + 'sender_claimed_keys': senderClaimedKeys, + }; }