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

Mark message as read if you quick reply #19365

Merged
merged 2 commits into from Sep 11, 2019

Conversation

@MarcoPolo
Copy link
Contributor

commented Sep 9, 2019


kbCtx.Log.CDebugf(ctx, "Marking as read from QuickReply: convID: %s", strConvID)
gc := globals.NewContext(kbCtx, kbChatCtx)
uid, err := utils.AssertLoggedInUID(ctx, gc)

This comment has been minimized.

Copy link
@mmaxim

mmaxim Sep 10, 2019

Member

Should early out here, and then just return nil at the bottom.

@MarcoPolo MarcoPolo requested a review from mmaxim Sep 10, 2019

@mmaxim
mmaxim approved these changes Sep 11, 2019
if err = kbChatCtx.InboxSource.MarkAsRead(context.Background(), convID, uid, msgID); err != nil {
kbCtx.Log.CDebugf(ctx, "Failed to mark as read from QuickReply: convID: %s. Err: %s", strConvID, err)
// We don't want to fail this method call just because we couldn't mark it as aread
err = nil

This comment has been minimized.

Copy link
@mmaxim

mmaxim Sep 11, 2019

Member

Don't need this anymore

@MarcoPolo MarcoPolo merged commit 7a59bd5 into master Sep 11, 2019

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/jenkins/pr-head This commit looks good
Details

@MarcoPolo MarcoPolo deleted the marco/mark-read-quick-reply-HOTPOT-699 branch Sep 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.