Skip to content

Commit e0e7418

Browse files
author
Jesus Terrazas
committed
revent to retrieving "additional_properties"
1 parent 2194200 commit e0e7418

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

libraries/microsoft-agents-a365-notifications/microsoft_agents_a365/notifications/models/agent_notification_activity.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from typing import Any, Optional, Type, TypeVar
2-
from microsoft_agents.activity.entity import Entity
32
from microsoft_agents.activity import Activity
43
from .notification_types import NotificationTypes
54
from .email_reference import EmailReference
@@ -22,17 +21,18 @@ def __init__(self, activity: Activity):
2221
entities = self.activity.entities or []
2322
for ent in entities:
2423
etype = ent.type.lower()
24+
payload = getattr(ent, "additional_properties", ent)
2525

2626
if etype == NotificationTypes.EMAIL_NOTIFICATION.lower() and self._email is None:
2727
try:
28-
self._email = Entity.model_validate(ent)
28+
self._email = EmailReference.model_validate(payload)
2929
self._notification_type = NotificationTypes.EMAIL_NOTIFICATION
3030
except Exception:
3131
self._email = None
3232

3333
if etype == NotificationTypes.WPX_COMMENT.lower() and self._wpx_comment is None:
3434
try:
35-
self._wpx_comment = Entity.model_validate(ent)
35+
self._wpx_comment = WpxComment.model_validate(payload)
3636
self._notification_type = NotificationTypes.WPX_COMMENT
3737
except Exception:
3838
self._wpx_comment = None

0 commit comments

Comments
 (0)