in ees_microsoft_teams/microsoft_teams_user_messages.py [0:0]
def fetch_meeting_recording(self, chat_id, chat):
"""Fetches meeting recording from the Microsoft Teams
:param chat_id: Id of the chat
:param chat: dictionary of the user chat
Returns: recording_dict: Document to be indexed in Workplace Search
"""
if (
chat["eventDetail"] and chat["eventDetail"][
"@odata.type"] == "#microsoft.graph.callRecordingEventMessageDetail"
):
url = chat["eventDetail"].get("callRecordingUrl")
if url and ".sharepoint.com" in url:
recording_dict = {"type": MEETING_RECORDING}
recording_dict["id"] = chat["eventDetail"]["callId"]
recording_dict["title"] = chat["eventDetail"][
"callRecordingDisplayName"
]
recording_dict["url"] = url
recording_dict["_allow_permissions"] = []
if self.is_permission_sync_enabled:
recording_dict["_allow_permissions"] = [chat_id]
return recording_dict