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

Mentions not serializing on Post method #31

Closed
a-vilmin opened this issue Mar 26, 2017 · 6 comments
Closed

Mentions not serializing on Post method #31

a-vilmin opened this issue Mar 26, 2017 · 6 comments
Labels

Comments

@a-vilmin
Copy link

a-vilmin commented Mar 26, 2017

I created a mention as documented with the id/loci info, but when calling post(text, mentionObj), I get a "TyperError about Mentions(['123456']) is not JSON serializable". I have no problems posting regular text to the group. Am I using the attachments.Mentions object wrong?

@rhgrant10
Copy link
Owner

No it looks like this is actually a bug, so thanks for reporting it! I'll get to this as soon as I can but to be honest I don't have a lot of time to work on my personal projects much right now. However, I will gladly review and accept a PR for this and release the fixed version.

@rhgrant10 rhgrant10 added the bug label Mar 29, 2017
@rhgrant10
Copy link
Owner

I'll add that the fix is to call each attachments' to_dict() method before passing them on to the endpoints' create() method in the groupy.object.responses.Recipient.post() method.

@rhgrant10
Copy link
Owner

Aw wait a minute. I knew this seemed familiar. This is a duplicate of #30 and should've been fixed in v0.7.0 but I can't​ seem to see where it was actually fixed! I'll investigate further.

@rhgrant10
Copy link
Owner

Ah, found the problem. It was fixed but only for posting bot messages.

@rhgrant10
Copy link
Owner

Now available in v0.7.1 :)

@a-vilmin
Copy link
Author

awesome thanks man!

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

No branches or pull requests

2 participants