penny-university / penny_university

5 stars 6 forks source link

`/penny help` errors in private channels #376

Open JnBrymn opened 3 years ago

JnBrymn commented 3 years ago

steps to repro

Expected: we would see the message appear in the private channel OR AT LEAST no sentry error

problem

Sentry indicates that the error is comming in chat_postEphemeral_with_fallback when we attempt to post an ephemeral message I can help you make a new Penny Chat to a direct channel (these are always prefixed with D). The "fallback" is to post the help message in the #Penny channel

solution

It would be nice if we could post a message in a private channel, but perhaps it makes sense that we can't. We need to check if Slack commands have any special allowances for things like this. Otherwise we need to just need to send to the Penny channel first without attempting to send to a private channel. WARNING: We have introduced a feature in matching where the bot creates a private channel and joins it. I think in this case the channel is reachable by the bot. Test this theory!

Also consider just not sending the Sentry exception in these cases. (They're currently still being sent - https://sentry.io/organizations/penny-university/issues/2005111335/?project=5284085&query=is%3Aunresolved)