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:
parent
5d4cab62e5
commit
18aa2a5375
|
@ -47,7 +47,7 @@ class Message:
|
||||||
self.__ts = json["ts"]
|
self.__ts = json["ts"]
|
||||||
self.__time = datetime.fromtimestamp(float(self.__ts))
|
self.__time = datetime.fromtimestamp(float(self.__ts))
|
||||||
self.__user = users.info(json.get("user", None))
|
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):
|
def __lt__(self, other):
|
||||||
return self.__time < other.__time
|
return self.__time < other.__time
|
||||||
|
|
Loading…
Reference in New Issue