Cli-microsoft365: New command: get replies to a message in a Microsoft Teams channel

Created on 11 Sep 2019  路  7Comments  路  Source: pnp/cli-microsoft365

Get replies to a message from a Microsoft Teams channel

command; teams messagereplies get -i| --groupId -c|--channelId -m|--messageId
groupId: id of the group
channelId: id of the channel
messageId: id of the message

new feature work in progress

Most helpful comment

Thanks for the proposal. A few comments:

  • I'd suggest we implement this as a separate command to keep things separate from message get which retrieves one specific message and nothing else
  • For the name I'd propose teams message reply list -i|--teamId <teamId> -c|--channelId <channelId> -m|--messageId <messageId>. In the CLI we use the verb get when we retrieve one specific object and list when we get multiple. In this case, list would be more in-line with everything else in the CLI

Other than that, looks good. Would you like to take it?

All 7 comments

The above is the obvious option (like for like the REST endpoint), but another (perhaps additional) way to go would be to extend the list or get message commands to include replies.

This (the obvious version) was a really quick addition to do in my fork and will include tests if there is an appetite for a PR. Thanks!

Thanks for the proposal. A few comments:

  • I'd suggest we implement this as a separate command to keep things separate from message get which retrieves one specific message and nothing else
  • For the name I'd propose teams message reply list -i|--teamId <teamId> -c|--channelId <channelId> -m|--messageId <messageId>. In the CLI we use the verb get when we retrieve one specific object and list when we get multiple. In this case, list would be more in-line with everything else in the CLI

Other than that, looks good. Would you like to take it?

Yep! Will implement as per your recommendations, thanks!

Awesome! All yours! Appreciate your help 馃憦

@waldekmastykarz any approximate timeframe for when this could be merged? Just working out if I need to apply back-off retry policy on my raw REST call while I wait.

We'll try to get it in asap. We have limited time to spend on the CLI and typically we want to process the oldest PRs first.

Regarding back-off retry: is that something different than throttling? If no, then throttling is already supported in the CLI and not something you need to implement specifically in your command.

Yes, I meant throttling. I'm aware that the CLI handles it, but I'm currently calling that endpoint in my script with a generic Invoke-WebRequest using the CLI's bearer token. All good - thanks for taking the time to respond!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VelinGeorgiev picture VelinGeorgiev  路  3Comments

joshua-probst picture joshua-probst  路  3Comments

plamber picture plamber  路  3Comments

garrytrinder picture garrytrinder  路  3Comments

waldekmastykarz picture waldekmastykarz  路  3Comments