Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't send buttons in chat #190

Closed
Ussr-eng opened this issue Mar 16, 2022 · 1 comment
Closed

Can't send buttons in chat #190

Ussr-eng opened this issue Mar 16, 2022 · 1 comment

Comments

@Ussr-eng
Copy link

Ussr-eng commented Mar 16, 2022

how can i send a message with buttons in skype chat by this lib?help please.

ch = self.chats[id]

button_val = {"type": "postBack", "title": "button_tit", "value": "value_but"}
create_button = SkypeCardMsg.Button(**button_val)

card_val = {"title": "title_butt", "body": "body_butt", "buttons": [create_button]}
create_card = SkypeCardMsg(**card_val)

ch.sendRaw(content=create_card.html, messagetype="UriObject")

this code return:

TypeError: <URIObject type="SWIFT.1" url_thumbnail="https://urlp.asm.skype.com/v1/url/content?url=https://neu1-urlp.secure.skypeassets.com/static/card-128x128.png">Card - access it on <a href="https://go.skype.com/cards.unsupported">https://go.skype.com/cards.unsupported</a>. <Swift b64="eyJ0aW1lc3RhbXAiOiIyMDIyLTAzLTE2VDIwOjUyOjU5LjQ4ODIzMloiLCJ0eXBlIjoibWVzc2FnZS9jYXJkIiwiYXR0YWNobWVudHMiOlt7ImNvbnRlbnQiOnsiYnV0dG9ucyI6W3sidHlwZSI6InBvc3RCYWNrIiwidmFsdWUiOiJ2YWx1ZV9idXQiLCJ0aXRsZSI6ImJ1dHRvbl90aXQifV0sInRleHQiOiJib2R5X2J1dHQiLCJ0aXRsZSI6InRpdGxlX2J1dHQifSwiY29udGVudFR5cGUiOiJhcHBsaWNhdGlvbi92bmQubWljcm9zb2Z0LmNhcmQuaGVybyJ9XX0="></Swift><Description></Description></URIObject> is not JSON serializable

@Terrance
Copy link
Owner

UriObject is probably not the right type -- see #51 (comment) for an example, but see also the remaining comments on that issue (that user-sent cards may not render in clients).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants