Split posts on newline

Slack lets you write posts with multiple paragraphs.  We were joining
everything together, but I think preserving the original newlines will
make things more readable.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2016-11-16 14:54:37 -05:00
parent 5d4cab62e5
commit 18aa2a5375
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class Message:
self.__ts = json["ts"]
self.__time = datetime.fromtimestamp(float(self.__ts))
self.__user = users.info(json.get("user", None))
self.__text = [ json["text"].encode("utf-8").decode(errors="replace")]
self.__text = json["text"].encode("utf-8").decode(errors="replace").split("\n")
def __lt__(self, other):
return self.__time < other.__time