move-coop / parsons

A python library of connectors for the progressive community.
https://www.parsonsproject.org/
Other
257 stars 125 forks source link

#741 : Deprecate Slack chat.postMessage `as_user` argument and allow for new authorship arguments #891

Closed angloyna closed 8 months ago

angloyna commented 9 months ago

Addresses #741

This PR adds a deprecation warning for usage of the as_user argument in calls to chat.postMessage, allows the user to see failed Slack API deprecated_argument responses, and facilitates usage of the new Slack authorship customization arguments username, icon_url, and icon_emoji using optional keyword arguments (See: https://api.slack.com/methods/chat.postMessage#authorship)

as_user will still be passed on to the slack request and will still fail if the user passes in as_user=False, but the user should see more information in the failed response now.

shaunagm commented 8 months ago

Thank you so much, @angloyna and sorry for the delay in merging!