slack icon indicating copy to clipboard operation
slack copied to clipboard

Return ScheduledMessageID everywhere

Open mfine opened this issue 2 years ago • 2 comments

Should this be an issue instead
  • [ ] is it a convenience method? (no new functionality, streamlines some use case)
  • [ ] exposes a previously private type, const, method, etc.
  • [ ] is it application specific (caching, retry logic, rate limiting, etc)
  • [ ] is it performance related.
API changes

This extends SendMessage* to return scheduled_message_id everywhere. It would be great if the impact of this change could be smaller, but the common SendMessage* functionality is used everywhere so needed to be extended everywhere it was used. If there's a better way to expose scheduled_message_id in a more limited fashion, that would be great.

Fixes #757

mfine avatar Mar 22 '22 17:03 mfine

@zchee What do you think?

kanata2 avatar Apr 16 '22 23:04 kanata2

@kanata2 @zchee Hello, I'm a one of waiting for release of this patch. I'm afraid to say that I'm happy if you proceed this pull request. Thanks!

pankona avatar Jun 30 '22 02:06 pankona

Isn't scheduled message ID applicable to SendScheduledMessage API only? And messageTs is applicable to only SendMessage API. IMO, this change makes it more confusing, and I personally don't like multi-values-return that returns more than 2 values because it's hard to know which one is what without a name. I'd replicate SendMessageContext for scheduled API maybe name it ScheduleMessageContext and returns scheduled message ID in the position of message TS. The better approach would be refactoring the API to reduce the duplication in code which is not much to reduce anyway. Just my 2 cents from the user who is waiting for this. PS. I have my own a fork version which supports this. My function returns only 2 values instead of 3 like SendMessageContext because I don't know why we need to get a channel ID back when the channel ID is a already known since it is one of function arguments. I don't mind keeping it consistent, but either cases, this will be a breaking change unless we have a new function (the hard part will be naming it :)) and deprecate the old one.

hussachai avatar Dec 20 '22 06:12 hussachai

I proposed the fix for this in the least intrusive way here https://github.com/slack-go/slack/pull/1153

hussachai avatar Dec 27 '22 07:12 hussachai

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Apr 05 '23 22:04 github-actions[bot]

This PR was closed because it has been stalled for 10 days with no activity.

github-actions[bot] avatar Apr 17 '23 00:04 github-actions[bot]