From 9f4ee74f2280f9e29d58bf9806b0fb761d32152f Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 12 Jun 2019 06:22:30 +0000 Subject: [PATCH] Fix getBody method. --- lib/src/Event.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/src/Event.dart b/lib/src/Event.dart index d42cf66..68fa1f9 100644 --- a/lib/src/Event.dart +++ b/lib/src/Event.dart @@ -73,7 +73,11 @@ class Event { String get formattedText => content["formatted_body"] ?? ""; /// Use this to get the body. - String getBody () => formattedText ?? text ?? "*** Unable to parse Content ***"; + String getBody () { + if (formattedText != "") return formattedText; + if (text != "") return text; + return "*** Unable to parse Content ***"; + } /// Get the real type. EventTypes get type {