Commit 2640e282 by Oleksandr Barabash

notification.id fixed

parent 9382fc4f
...@@ -201,7 +201,7 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler): ...@@ -201,7 +201,7 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
response = await turn_context.send_activity(message) response = await turn_context.send_activity(message)
notification.message_id = response.id notification.message_id = response.id
await self.cosmos_client.create_notification(notification) await self.cosmos_client.create_notification(notification)
print(f"notification response: {response}") log.info(f"notification response: {response}")
future.set_result(notification.id) future.set_result(notification.id)
except Exception as exception: except Exception as exception:
future.set_exception(exception) future.set_exception(exception)
......
...@@ -261,7 +261,6 @@ class CosmosClient: ...@@ -261,7 +261,6 @@ class CosmosClient:
async def create_notification(self, notification: NotificationCosmos)\ async def create_notification(self, notification: NotificationCosmos)\
-> NotificationCosmos: -> NotificationCosmos:
""" Crete notification in the DB """ """ Crete notification in the DB """
notification.id = uuid.uuid4().__str__()
schema = NotificationCosmos.get_schema(unknown=EXCLUDE) schema = NotificationCosmos.get_schema(unknown=EXCLUDE)
container = await self.get_notifications_container() container = await self.get_notifications_container()
# TODO(s1z): change this to async!!! # TODO(s1z): change this to async!!!
......
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