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

Status.reblogged? returns false even with a reblog attribute set #32

Open
renatolond opened this issue Aug 8, 2017 · 4 comments
Open

Comments

@renatolond
Copy link
Contributor

I'm testing a status that has a reblog and even thought the reblog attribute is set to another status, calling reblogged? returns false because the reblogged attribute is also set to false.

@Gargron
Copy link
Member

Gargron commented Aug 8, 2017

reblog: If that status is a reblog, this contains the original status being reblogged

reblogged?: Whether you (the authenticated user) have reblogged the status

They are orthogonal.

@renatolond
Copy link
Contributor Author

Hm, but how can I check if a status is a reblog? Because I saw that calling reblog on a status that is not a reblog raises a:

> s.reblog
NoMethodError: undefined method `fetch' for nil:NilClass

That's why I assumed the reblogged? method was to check if the status itself was a reblog.

@hakanai
Copy link

hakanai commented Oct 20, 2017

The docs on #reblog don't state what the method actually does at all so I guess it can just return random status objects and it's behaving "correctly"... o_o

@renatolond
Copy link
Contributor Author

Well, I've extended the lib with something like this to be able to do what I wanted:

https://github.com/renatolond/mastodon-twitter-poster/blob/master/lib/mastodon_ext.rb#L3-L10

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

No branches or pull requests

3 participants