in connectors/sources/microsoft_teams.py [0:0]
def format_channel_meeting(self, reply):
document = {"type": TeamEndpointName.MEETING.value}
event = reply["eventDetail"]
if event.get("@odata.type") == "#microsoft.graph.callEndedEventMessageDetail":
participant_list = []
for participant in event.get("callParticipants", []):
user = participant.get("participant", {}).get("user")
if user:
participant_list.append(user.get("displayName"))
participant_names = ", ".join(participant_list)
document.update(
{
"_id": event.get("callId"),
"_timestamp": reply.get("lastModifiedDateTime"),
"participants": participant_names,
}
)
elif (
event.get("@odata.type")
== "#microsoft.graph.callRecordingEventMessageDetail"
):
if event.get("callRecordingUrl") and (
".sharepoint.com" in event["callRecordingUrl"]
):
document.update(
{
"title": event.get("callRecordingDisplayName"),
"recording_url": event.get("callRecordingUrl"),
}
)
return document