feat: Ability to unmute muted conversations (#1319)

This commit is contained in:
Dmitriy Shcherbakan
2020-10-08 12:02:08 +05:30
committed by GitHub
parent 2aad33a5be
commit ecebe163e1
13 changed files with 242 additions and 0 deletions
+4
View File
@@ -89,6 +89,10 @@ class Conversation < ApplicationRecord
Redis::Alfred.setex(mute_key, 1, mute_period)
end
def unmute!
Redis::Alfred.delete(mute_key)
end
def muted?
!Redis::Alfred.get(mute_key).nil?
end