Originally team field in request context was deemed to make sure team id + channel id comprise a unique id for the channel.
But team id isn't used in posting messages with the Slack public API. So we don't use team id either.
The problem arises when app_mention event lacks team field (e.g. Slack's Workflow Builder doesn't use it). It results in spec validation failure for the legitimate commands, e.g.:
INFO dienstplan.commands - Parsed command: {:context {:channel "C123", :team nil, :ts "1641884435.029700"}, :command :who, :args {:name "duty"}, :error "Usage:\n@dienstplan who <rotation name>\n\nExample:\n@dienstplan who backend-rota"}
although the command and its args have been parsed correctly.
Originally
team
field in request context was deemed to make sure team id + channel id comprise a unique id for the channel. Butteam
id isn't used in posting messages with the Slack public API. So we don't useteam
id either. The problem arises whenapp_mention
event lacksteam
field (e.g. Slack's Workflow Builder doesn't use it). It results in spec validation failure for the legitimate commands, e.g.:although the command and its args have been parsed correctly.
Let's remove
team
from the request context