diff --git a/docs/user/cards.rst b/docs/user/cards.rst index 9c7a369..957f2db 100644 --- a/docs/user/cards.rst +++ b/docs/user/cards.rst @@ -31,7 +31,7 @@ Lets dive into a simple example that sends a card to a room card = AdaptiveCard(body=[greeting, first_name, age], actions=[submit]) api = WebexTeamsAPI() - api.messages.create(text="fallback", roomId="...", cards=card) + api.messages.create(text="fallback", roomId="...", attachments=[card]) The message we send with this code then looks like this in our Webex Teams client: diff --git a/webexteamssdk/api/messages.py b/webexteamssdk/api/messages.py index b0a9916..c38b561 100644 --- a/webexteamssdk/api/messages.py +++ b/webexteamssdk/api/messages.py @@ -200,7 +200,7 @@ def create(self, roomId=None, toPersonId=None, toPersonEmail=None, for item, attachment in enumerate(attachments): check_type(attachment, (dict, AdaptiveCard)) - if isinstance(attachments, AdaptiveCard): + if isinstance(attachment, AdaptiveCard): attachments[item] = make_attachment(attachment) post_data = dict_from_items_with_values(