Skip to content

Commit

Permalink
Changed max message size variable for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
lordsarcastic committed Jul 22, 2024
1 parent 4daf202 commit 20b0909
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generators/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def _generate_entities_list_with_level_and_link(

# we must account for the length of the level title
# in the max size of a slack message block
MAX_MESSAGE_BLOCK_SIZE_FOR_TITLE = (
max_message_block_size_for_entities = (
SlackMessageGenerator.SLACK_MAX_MESSAGE_BLOCK_SIZE
- len(level_title)
)
Expand All @@ -341,7 +341,7 @@ def _generate_entities_list_with_level_and_link(
text_length = 0
entities_text = ""
while text_length < (
MAX_MESSAGE_BLOCK_SIZE_FOR_TITLE
max_message_block_size_for_entities
) and current_count < len(entities):
current_entities.append(entities[current_count])
entities_text = " \n".join(
Expand Down

0 comments on commit 20b0909

Please sign in to comment.