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

Added informative messages on issues related to recent-messages #3029

Merged
merged 8 commits into from
Jul 18, 2021

Conversation

zneix
Copy link
Collaborator

@zneix zneix commented Jul 17, 2021

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

Added an generic error message if request to recent-messgaes fails, including status code of the HTTP request.

error message

Added an informative message telling user that recent-messages bot isn't currently joined in the channel, for which they requested historical messages, explaining that messages we received might be incomplete.

dank gap message

Closes #2870

@zneix zneix requested a review from RAnders00 July 17, 2021 01:50
Comment on lines 818 to 823
if (errorCode == "channel_not_joined")
{
shared->addMessage(makeSystemMessage(
"Recent-messages API isn't currently joined to "
"this channel (in progress or due to an issue)."));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the errorCode is channel_not_joined and messages is not empty we can deduce that the bot was joined previously but has disconnected, we can inform the user that there may be gaps in the message history: Message history service recovering, there may be gaps in the message history

If the errorCode is channel_not_joined and messages is empty I don't think we should print anything, because there's no difference for you vs for the next user who joins and sees nothing other than "Wow! You were the first user here with Chatterino! Congratulations! 🚀"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be resolved in 3f1d81f, let me know if it's good enough.

Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@zneix zneix merged commit 1f19d31 into master Jul 18, 2021
@zneix zneix deleted the zneix/feature/recent-messages-error-messages branch July 18, 2021 12:15
zneix added a commit to SevenTV/chatterino7 that referenced this pull request Jul 25, 2021
Now we're on commit 770b9f2; Changes from upstream we pulled:

- Minor: Added informative messages for recent-messages API's errors. (Chatterino#3029)
- Minor: Added section with helpful Chatterino-related links to the About page. (Chatterino#3068)
- Bugfix: Fixed PubSub not properly trying to resolve pending listens when the pending listens list was larger than 50. (Chatterino#3037)
- Bugfix: Copy buttons in usercard now show properly in light mode (Chatterino#3057)
- Bugfix: Fixed comma appended to username completion when not at the beginning of the message. (Chatterino#3060)
- Bugfix: Fixed bug misplacing chat when zooming on Chrome with Chatterino Native Host extension (Chatterino#1936)
- Dev: Disabled update checker on Flatpak. (Chatterino#3051)
- Dev: Add logging for HTTP requests (Chatterino#2991)
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

Successfully merging this pull request may close these issues.

Handle recent-messages request errors better
3 participants