1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Update code

This commit is contained in:
2021-02-06 13:26:35 +01:00
parent 06aa84e3a1
commit 6db9eade90
2 changed files with 137 additions and 67 deletions

View File

@ -21,7 +21,7 @@ class WsMessage {
/// Construct a message from a JSON document (messages coming from the server)
static WsMessage fromJSON(final Map<dynamic, dynamic> m) {
return WsMessage(id: m["id"], title: m["title"], data: m["data"]);
return WsMessage(id: m["id"] ?? "", title: m["title"], data: m["data"]);
}
/// Turn a message into a JSON object to send it to the API