-
Notifications
You must be signed in to change notification settings - Fork 492
feat: add GetMeetingInfo and meeting event support #5655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
816d67b
add getMeetingDetails support
mdrichardson 568f6fa
schema rename
mdrichardson 9d4d37a
doc comment change
mdrichardson 6c95695
GetMeetingDetails -> GetMeetingInfo
mdrichardson 6ca8c40
doc changes
mdrichardson c5f5628
add event schemas
mdrichardson f726912
add meeting event handlers
mdrichardson 7505627
add meeting event tests
mdrichardson 5ad1f99
fix tests for MacOS
mdrichardson 28a3659
move usings outside namespace
mdrichardson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: The inheritance around these new classes/interfaces is based around how Teams sends different but similar payloads for See review comments (some marked as resolved) for the JS PR for previous discussion. |
||
| // Licensed under the MIT License. | ||
| using System; | ||
| using Newtonsoft.Json; | ||
|
|
||
| namespace Microsoft.Bot.Schema.Teams | ||
| { | ||
| /// <summary> | ||
| /// Specific details of a Teams meeting. | ||
| /// </summary> | ||
| public partial class MeetingDetails : MeetingDetailsBase | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="MeetingDetails"/> class. | ||
| /// </summary> | ||
| public MeetingDetails() | ||
| { | ||
| CustomInit(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="MeetingDetails"/> class. | ||
| /// </summary> | ||
| /// <param name="id">The meeting's Id, encoded as a BASE64 string.</param> | ||
| /// <param name="msGraphResourceId">The MsGraphResourceId, used specifically for MS Graph API calls.</param> | ||
| /// <param name="scheduledStartTime">The meeting's scheduled start time, in UTC.</param> | ||
| /// <param name="scheduledEndTime">The meeting's scheduled end time, in UTC.</param> | ||
| /// <param name="joinUrl">The URL used to join the meeting.</param> | ||
| /// <param name="title">The title of the meeting.</param> | ||
| /// <param name="type">The meeting's type.</param> | ||
| public MeetingDetails( | ||
| string id, | ||
| string msGraphResourceId = null, | ||
| DateTime scheduledStartTime = default, | ||
| DateTime scheduledEndTime = default, | ||
| Uri joinUrl = null, | ||
| string title = null, | ||
| string type = "Scheduled") | ||
| : base(id, joinUrl, title) | ||
| { | ||
| MsGraphResourceId = msGraphResourceId; | ||
| ScheduledStartTime = scheduledStartTime; | ||
| ScheduledEndTime = scheduledEndTime; | ||
| Type = type; | ||
|
|
||
| CustomInit(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the MsGraphResourceId, used specifically for MS Graph API calls. | ||
| /// </summary> | ||
| /// <value> | ||
| /// The MsGraphResourceId, used specifically for MS Graph API calls. | ||
| /// </value> | ||
| [JsonProperty(PropertyName = "msGraphResourceId")] | ||
| public string MsGraphResourceId { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the meeting's scheduled start time, in UTC. | ||
| /// </summary> | ||
| /// <value> | ||
| /// The meeting's scheduled start time, in UTC. | ||
| /// </value> | ||
| [JsonProperty(PropertyName = "scheduledStartTime")] | ||
| public DateTime ScheduledStartTime { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the meeting's scheduled end time, in UTC. | ||
| /// </summary> | ||
| /// <value> | ||
| /// The meeting's scheduled end time, in UTC. | ||
| /// </value> | ||
| [JsonProperty(PropertyName = "scheduledEndTime")] | ||
| public DateTime ScheduledEndTime { get; set; } | ||
tracyboehrer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /// <summary> | ||
| /// Gets or sets the meeting's type. | ||
| /// </summary> | ||
| /// <value> | ||
| /// The meeting's type. | ||
| /// </value> | ||
| [JsonProperty(PropertyName = "type")] | ||
| public string Type { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// An initialization method that performs custom operations like setting defaults. | ||
| /// </summary> | ||
| partial void CustomInit(); | ||
| } | ||
| } | ||
71 changes: 71 additions & 0 deletions
71
libraries/Microsoft.Bot.Schema/Teams/MeetingDetailsBase.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
| using System; | ||
| using Newtonsoft.Json; | ||
|
|
||
| namespace Microsoft.Bot.Schema.Teams | ||
| { | ||
| /// <summary> | ||
| /// Specific details of a Teams meeting. | ||
| /// </summary> | ||
| public partial class MeetingDetailsBase | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="MeetingDetailsBase"/> class. | ||
| /// </summary> | ||
| internal MeetingDetailsBase() | ||
| { | ||
| CustomInit(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="MeetingDetailsBase"/> class. | ||
| /// </summary> | ||
| /// <param name="id">The meeting's Id, encoded as a BASE64 string.</param> | ||
| /// <param name="joinUrl">The URL used to join the meeting.</param> | ||
| /// <param name="title">The title of the meeting.</param> | ||
| internal MeetingDetailsBase( | ||
| string id, | ||
| Uri joinUrl = null, | ||
| string title = null) | ||
| { | ||
| Id = id; | ||
| JoinUrl = joinUrl; | ||
| Title = title; | ||
|
|
||
| CustomInit(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the meeting's Id, encoded as a BASE64 string. | ||
| /// </summary> | ||
| /// <value> | ||
| /// The meeting's Id, encoded as a BASE64 string. | ||
| /// </value> | ||
| [JsonProperty(PropertyName = "id")] | ||
| public string Id { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the URL used to join the meeting. | ||
| /// </summary> | ||
| /// <value> | ||
| /// The URL used to join the meeting. | ||
| /// </value> | ||
| [JsonProperty(PropertyName = "joinUrl")] | ||
| public Uri JoinUrl { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the title of the meeting. | ||
| /// </summary> | ||
| /// <value> | ||
| /// The title of the meeting. | ||
| /// </value> | ||
| [JsonProperty(PropertyName = "title")] | ||
| public string Title { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// An initialization method that performs custom operations like setting defaults. | ||
| /// </summary> | ||
| partial void CustomInit(); | ||
| } | ||
| } |
56 changes: 56 additions & 0 deletions
56
libraries/Microsoft.Bot.Schema/Teams/MeetingEndEventDetails.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
| using System; | ||
| using Newtonsoft.Json; | ||
|
|
||
| namespace Microsoft.Bot.Schema.Teams | ||
| { | ||
| /// <summary> | ||
| /// Specific details of a Teams meeting end event. | ||
| /// </summary> | ||
| public partial class MeetingEndEventDetails : MeetingEventDetails | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="MeetingEndEventDetails"/> class. | ||
| /// </summary> | ||
| public MeetingEndEventDetails() | ||
| { | ||
| CustomInit(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="MeetingEndEventDetails"/> class. | ||
| /// </summary> | ||
| /// <param name="id">The meeting's Id, encoded as a BASE64 string.</param> | ||
| /// <param name="joinUrl">The URL used to join the meeting.</param> | ||
| /// <param name="title">The title of the meeting.</param> | ||
| /// <param name="meetingType">The meeting's type.</param> | ||
| /// <param name="endTime">Timestamp for the meeting end, in UTC.</param> | ||
| public MeetingEndEventDetails( | ||
| string id, | ||
| Uri joinUrl = null, | ||
| string title = null, | ||
| string meetingType = "Scheduled", | ||
| DateTime endTime = default) | ||
| : base(id, joinUrl, title, meetingType) | ||
| { | ||
| EndTime = endTime; | ||
|
|
||
| CustomInit(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the meeting's end time, in UTC. | ||
| /// </summary> | ||
| /// <value> | ||
| /// The meeting's end time, in UTC. | ||
| /// </value> | ||
| [JsonProperty(PropertyName = "EndTime")] | ||
| public DateTime EndTime { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// An initialization method that performs custom operations like setting defaults. | ||
| /// </summary> | ||
| partial void CustomInit(); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: There's a couple of things I'm not sure about with these:
OnTeamsFileConsent) haveturnContextfirst, while others (likeOnTeamsChannelDeleted) haveturnContextcome after the method-specific arguments (likechannelInfoandteamsInfo).asyncis the right call. Just want to confirm.