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

unreads: Don't add messages with "read" flag to unreads. #4710

Merged
merged 3 commits into from May 21, 2021

Commits on May 7, 2021

  1. unreads: Don't add messages with "read" flag to unreads.

    Previously, the main case where we wouldn't add a message to unreads was
    if we were the one who sent it. This check was not correct - instead, we
    want to check to see if the message has the "read" flag, which is set by
    the server.
    
    In the past, these checks were very close to the same (with the
    exception of "Notification Bot" announcing a stream that you created,
    which would be "read" for you), but with the addition of muted users,
    the check is now incorrect.
    
    This commit removes the logic to not mark a message as read when we are
    the one who sent it, and instead just looks at the server flag, since
    that should be the canonical place for that information to be.
    WesleyAC committed May 7, 2021
    Copy the full SHA
    1a10708 View commit details
    Browse the repository at this point in the history
  2. unreads: Fix latent bug with unread self-PMs.

    If the server sends us a message that isn't marked as read, we should
    always add it to unreads. However, we previously didn't do this in the
    case of a self-PM.
    
    This commit fixes this, even though we don't expect this to ever happen.
    WesleyAC committed May 7, 2021
    Copy the full SHA
    e36d08a View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    8cac82c View commit details
    Browse the repository at this point in the history