-
Notifications
You must be signed in to change notification settings - Fork 34
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
Bot should update conversions on edited posts #67
Comments
Simplest solution might be to re-check last, say 100 comments, so that would probably make sure any edited comments within 10 minutes of creation or so have a correct response. |
I'd argue because it's not possible to do this automatically with any reliability that trying to do it automatically will create a very confusing user experience -- "why hasn't the bot updated the conversion when I edited my comment but it did for another comment I saw? How do I make it update?". The problem of edited comments is meaningful enough to try and solve, but I don't think it's a big enough problem to justify the introduction of a solution that has so many caveats. Given the bot already has support for receiving Private Messages which trigger an action, perhaps an additional trigger for updating a reply would be the correct approach as it would provide a consistent experience for all users. A "refresh reply" link in the footer of each reply to a new message where the subject is "refresh" and the body is the comment ID that any user can send to the bot when they notice a mismatched comment/conversion. I would like to try implementing that solution if there aren't any problems I've missed -- is rate limiting important to prevent malicious users from crashing the bot by sending lots of refresh requests? Does the reddit API have limits that will prevent the bot from updating comments? |
Given the limitations of the reddit API, I agree, I don't think we can come up with a foolproof automated solution. Perhaps a human-solution is the way to go. I like the idea of a link that says "refresh"! I feel like we might have to cut down on number of links in the footer though (maybe source and hacktoberfest can go) ... but I digress, that's a completely different issue. It'd be awesome if you could pick up this issue @citricsquid! Assigning to you :) So, from my past research: the reddit API limits bot scripts to ~100 requests per minute, and it allows for periods of "burstiness" of up to 200 requests per minute. Right now the bot is doing a maximum of maybe ~10 requests per minute (since polling for new comments is "free", from an unauthenticated endpoint). I don't forsee API limits being an issue for a delete link BUT if you do go over the limit, reddit puts your bot on "cool down" for 10 minutes where it ignores your request. If your bot goes rogue (consistently going over the rate limit) reddit might start permanently rejecting your user agent string to prevent abuse. It's easy to change its user agent string though, so you can release the next version of your bot (with the rate limit problem fixed, hopefully) and reddit will start accepting your requests again |
The "edit" functionality is working now, pretty sweet! I also give it a little "edit" prefix. There was a messed up thing in the base |
Repro steps:
Expected: metric_unit bot should also edit its comment to say "5 feet ~ 1.5 metres"
Actual: metric_bot's reply still says "50 feet ~ 15 metres"
Discussion:
This is a pretty complicated story to do, because there is no notification when a user edits their comment. The current behaviour is not an ideal user experience, but is this something we want to fix?
The text was updated successfully, but these errors were encountered: