diff options
author | Ryan Huber <rhuber@gmail.com> | 2017-04-21 09:02:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-21 09:02:39 -0700 |
commit | bdae484b57f03a43a095b7423faf88a7824a7c4a (patch) | |
tree | 4b83ca4e19c8fa5e80498e0fa341e4710c2cbcdd | |
parent | f4746f965bc54e2511fa6adc9ec9909c88c4f479 (diff) | |
parent | 5dfa8bf758df628ea8bf095fffc95fe25fe16fb0 (diff) | |
download | wee-slack-bdae484b57f03a43a095b7423faf88a7824a7c4a.tar.gz |
Merge pull request #356 from ToxicFrog/toxicfrog/missing-text
Fix channel history not appearing when an earlier message has 'text': None
-rw-r--r-- | wee_slack.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py index a3d43ce..e5aaa9a 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1859,8 +1859,8 @@ class SlackMessage(object): self.sender, self.sender_plain = senders[0], senders[1] self.suffix = '' self.ts = SlackTS(message_json['ts']) - text = self.message_json.get('text', '') - if text.startswith('_') and text.endswith('_') and 'subtype' not in message_json: + text = self.message_json.get('text') + if text and text.startswith('_') and text.endswith('_') and 'subtype' not in message_json: message_json['text'] = text[1:-1] message_json['subtype'] = 'me_message' if message_json.get('subtype') == 'me_message' and not message_json['text'].startswith(self.sender): |