-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Minor telegram tweak (km_walked truncated to 2 decimals) #4979
Conversation
Reduces file IO and eliminates chance of error
- Get stats from inventory instead of reading .json - Issue with "master" id - Truncated km_walked to 2 decimals for readability
@Gobberwart, thanks for your PR! By analyzing the annotation information on this pull request, we identified @askovpen, @DBa2016 and @pulgalipe to be potential reviewers |
@@ -56,7 +56,7 @@ def run(self): | |||
self.update_id = update.update_id+1 | |||
if update.message: | |||
self.bot.logger.info("message from {} ({}): {}".format(update.message.from_user.username, update.message.from_user.id, update.message.text)) | |||
if self.master and self.master not in [update.message.from_user.id, "@{}".format(update.message.from_user.username)]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original code has two way to config the master:
username or chat_id, you changed to only chat_id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you're saying, but it wasn't responding to my /info at all with the way it was.. Will keep looking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Username not work. Master can be userid or @channelname.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just put this back the way it was. If the original isn't working, fix it and create a new PR
Agreed with @solderzzc here, no need to remove username recognition. The piece which automatically recognized chat_id was removed in the PR which moved Telegram into thread, but will be re-added once #4969 is merged. |
I removed it because the original didn't work. |
Looks like I had a telegram api issue while testing this. Reverted to original because it's working fine. The only change here is truncating km to 2 decimals. Should be a no-brainer. |
yep, easy to merge this one:) |
The recognition of non-numeric master is not working right now because #4951 has removed the relevant piece of code without replacement. |
Short Description:
Minor tweaks to telegram