feat_: adding 24hours duration for chats mute (#5020)

Needed for https://github.com/status-im/status-desktop/issues/13393
This commit is contained in:
Alexandra Betouni 2024-09-04 17:41:45 +03:00 committed by GitHub
parent 6287b5fcf7
commit 060918bcd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,7 @@ const (
MuteFor15MinsDuration = 15 * time.Minute
MuteFor1HrsDuration = time.Hour
MuteFor8HrsDuration = 8 * time.Hour
MuteFor24HrsDuration = 24 * time.Hour
MuteFor1WeekDuration = 7 * 24 * time.Hour
)
@ -63,6 +64,7 @@ const (
MuteFor15Min requests.MutingVariation = iota + 1
MuteFor1Hr
MuteFor8Hr
MuteFor24Hr
MuteFor1Week
MuteTillUnmuted
MuteTill1Min

View File

@ -4393,6 +4393,8 @@ func (m *Messenger) MuteChat(request *requests.MuteChat) (time.Time, error) {
MuteTill = time.Now().Add(MuteFor1HrsDuration)
case MuteFor8Hr:
MuteTill = time.Now().Add(MuteFor8HrsDuration)
case MuteFor24Hr:
MuteTill = time.Now().Add(MuteFor24HrsDuration)
case MuteFor1Week:
MuteTill = time.Now().Add(MuteFor1WeekDuration)
default:

View File

@ -1206,6 +1206,8 @@ func (m *Messenger) MuteDuration(mutedType requests.MutingVariation) (time.Time,
MuteTill = time.Now().Add(MuteFor1HrsDuration)
case MuteFor8Hr:
MuteTill = time.Now().Add(MuteFor8HrsDuration)
case MuteFor24Hr:
MuteTill = time.Now().Add(MuteFor24HrsDuration)
case MuteFor1Week:
MuteTill = time.Now().Add(MuteFor1WeekDuration)
default: