Commit a931bc93 by Oleksandr Barabash

more logs to the submit hander

parent 2b311e68
...@@ -259,14 +259,17 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler): ...@@ -259,14 +259,17 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
ack_objects = await self.cosmos_client.get_acknowledge_items( ack_objects = await self.cosmos_client.get_acknowledge_items(
mx.notification_id mx.notification_id
) )
log.info(f"ack_objects: {ack_objects}")
if len(ack_objects) > 0: if len(ack_objects) > 0:
return return
log.info("creating acknowledge item")
await self.cosmos_client.create_acknowledge(mx.notification_id, await self.cosmos_client.create_acknowledge(mx.notification_id,
account) account)
notification = await self.cosmos_client.get_notification( notification = await self.cosmos_client.get_notification(
mx.notification_id mx.notification_id
) )
log.info("updating card with the responsible user")
card = CardHelper.create_notification_card( card = CardHelper.create_notification_card(
notification, notification,
turn_context.activity.from_property.name turn_context.activity.from_property.name
...@@ -275,6 +278,7 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler): ...@@ -275,6 +278,7 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
message = Activity(id=turn_context.activity.reply_to_id, message = Activity(id=turn_context.activity.reply_to_id,
type=ActivityTypes.message, type=ActivityTypes.message,
attachments=attachments) attachments=attachments)
log.info("updating the card")
await turn_context.update_activity(message) await turn_context.update_activity(message)
except ItemNotFound: except ItemNotFound:
# DO NOTHING, Notification not found! # DO NOTHING, Notification not found!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment