We received an error from sentry while trying to send our Penny Chat reminders for a recent chat with 10 participants.
The request to the Slack API failed.
The server responded with: {'ok': False, 'error': 'invalid_blocks', 'response_metadata': {'messages': ['[ERROR] no more than 10 items allowed [json-pointer:/blocks/4/elements]']}}
After some digging, I found that we are creating a list of profile images to attach to the reminder message, along with a string for how many participants there are. Since we had 10 participants, these images plus the attending string caused the error. We need to limit the number of attendees we show profiles for, and then have an adjusted messaged like "and 3 more attending" if we go over the limit.
Requirements
[x] Limit the number of profiles pictures being sent with the reminder message
[x] Update message if over the limit to "and X more attending"
Description
We received an error from sentry while trying to send our Penny Chat reminders for a recent chat with 10 participants.
After some digging, I found that we are creating a list of profile images to attach to the reminder message, along with a string for how many participants there are. Since we had 10 participants, these images plus the attending string caused the error. We need to limit the number of attendees we show profiles for, and then have an adjusted messaged like "and 3 more attending" if we go over the limit.
Requirements