Skip to content

Commit

Permalink
Deprecate getTeamMembers and getMembers. (#4141)
Browse files Browse the repository at this point in the history
Marked getMembers and getTeamMembers as deprecated.

Co-authored-by: Monica Rivera <44449640+mrivera-ms@users.noreply.github.com>
  • Loading branch information
LeeParrishMSFT and mrivera-ms authored Mar 11, 2022
1 parent 2e31329 commit 96e3fbe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/botbuilder/etc/botbuilder.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,14 @@ export class TeamsInfo {
static getMeetingInfo(context: TurnContext, meetingId?: string): Promise<TeamsMeetingInfo>;
static getMeetingParticipant(context: TurnContext, meetingId?: string, participantId?: string, tenantId?: string): Promise<TeamsMeetingParticipant>;
static getMember(context: TurnContext, userId: string): Promise<TeamsChannelAccount>;
// @deprecated
static getMembers(context: TurnContext): Promise<TeamsChannelAccount[]>;
static getPagedMembers(context: TurnContext, pageSize?: number, continuationToken?: string): Promise<TeamsPagedMembersResult>;
static getPagedTeamMembers(context: TurnContext, teamId?: string, pageSize?: number, continuationToken?: string): Promise<TeamsPagedMembersResult>;
static getTeamChannels(context: TurnContext, teamId?: string): Promise<ChannelInfo[]>;
static getTeamDetails(context: TurnContext, teamId?: string): Promise<TeamDetails>;
static getTeamMember(context: TurnContext, teamId?: string, userId?: string): Promise<TeamsChannelAccount>;
// @deprecated
static getTeamMembers(context: TurnContext, teamId?: string): Promise<TeamsChannelAccount[]>;
static sendMessageToTeamsChannel(context: TurnContext, activity: Activity, teamsChannelId: string, botAppId?: string): Promise<[ConversationReference, string]>;
}
Expand Down
4 changes: 4 additions & 0 deletions libraries/botbuilder/src/teamsInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ export class TeamsInfo {
*
* @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
* @returns The list of [TeamsChannelAccount](xref:botframework-schema.TeamsChannelAccount).
*
* @deprecated Use `getPagedTeamMembers` instead.
*/
public static async getMembers(context: TurnContext): Promise<TeamsChannelAccount[]> {
const teamId = this.getTeamId(context);
Expand Down Expand Up @@ -277,6 +279,8 @@ export class TeamsInfo {
* @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
* @param teamId ID of the Teams team.
* @returns The list of [TeamsChannelAccount](xref:botframework-schema.TeamsChannelAccount) of the members.
*
* @deprecated Use `getPagedTeamMembers` instead.
*/
public static async getTeamMembers(context: TurnContext, teamId?: string): Promise<TeamsChannelAccount[]> {
const t = teamId || this.getTeamId(context);
Expand Down

0 comments on commit 96e3fbe

Please sign in to comment.