From 608a137d2be0dec78a257d5dfcc225e132a2e006 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 19 Nov 2019 10:05:04 -0500 Subject: [PATCH] Fix new linting issues --- app/channel.go | 2 +- app/post_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/channel.go b/app/channel.go index c705b1f2a9..e678955a90 100644 --- a/app/channel.go +++ b/app/channel.go @@ -1800,7 +1800,7 @@ func (a *App) MarkChannelAsUnreadFromPost(postID string, userID string) (*model. } channelUnread, updateErr := a.Srv.Store.Channel().UpdateLastViewedAtPost(post, userID, unreadMentions) - if err != nil { + if updateErr != nil { return channelUnread, updateErr } diff --git a/app/post_test.go b/app/post_test.go index 1aafc913c0..458a6fa161 100644 --- a/app/post_test.go +++ b/app/post_test.go @@ -1276,6 +1276,7 @@ func TestCountMentionsFromPost(t *testing.T) { ChannelId: channel.Id, Message: "test", }, channel, false) + require.Nil(t, err) count, err := th.App.countMentionsFromPost(user2, post1)