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
Better nick handling in 'repall' #90
Conversation
- Always have the owner of the tweet responding to first in the response - Never include the user's nick in the list - Make sure we don't have duplicate nicks All with the added bonus of avoiding regexing due to Twitter's entities list
Thinking about it, there's only one case where these changes won't "do the right thing", that is if you use Perhaps it would be better to move the filtering of the user's own nick into the for-loop, so the person you are responding to always will be mentioned first in the reply, regardless of it being yourself or not. What do you think? |
Hi @Tenzer Thanks for contributing 👍 I can see why this should be improved, but how to fix is really hard. Can you show me how to move the filter ? |
Sure, I have done it in commit 97def8f. I copied the code styling used in |
Thanks !! I will test this for a while before merge |
I'll do the same. If it turns out to work fine, I think it would make sense to look through the code and see if there are other places where it could benefit from using entities instead of parsing items from the tweet text. |
I just pushed an extra commit to the branch, it corrects a mistake I made where I try to iterate over the |
Better nick handling in 'repall'
I wrote this reply by using the
repall
command, and as you can see it mentioned myself first. I had a look at the code behind it and made a few improvements:I also switched the previous nick parsing to use the entities list of the tweet. Here's a link to the documentation for that.