3
0

Prevent negative view counts

This commit is contained in:
Denis Arh
2018-10-22 15:11:52 +02:00
parent 6ea52301f4
commit 91aa4d6e27
+1 -1
View File
@@ -36,7 +36,7 @@ const (
sqlChannelViewsDecCount = `UPDATE channel_views
SET new_messages_count = new_messages_count - 1
WHERE rel_channel = ? AND rel_user <> ?`
WHERE rel_channel = ? AND rel_user <> ? AND new_messages_count > 0`
)
// ChannelView creates new instance of channel member repository