diff options
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 84c437f..56944f8 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3443,7 +3443,10 @@ class SlackMessage(object): ), ) - text = replace_string_with_emoji(text) + # replace_string_with_emoji() was called on blocks earlier via + # unfurl_blocks(), so exclude them here + text_to_replace = text[len(blocks_rendered) :] + text = text[: len(blocks_rendered)] + replace_string_with_emoji(text_to_replace) self.message_json["_rendered_text"] = text return text |