mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 15:06:30 +03:00
dtransform mute chat to use relative durations
instead of absolute timestamps
This commit is contained in:
@@ -1938,7 +1938,13 @@ impl MuteDuration {
|
||||
match value {
|
||||
0 => MuteDuration::NotMuted,
|
||||
-1 => MuteDuration::Forever,
|
||||
_ => MuteDuration::MutedUntilTimestamp(value),
|
||||
_ => {
|
||||
if value <= time() {
|
||||
MuteDuration::NotMuted
|
||||
} else {
|
||||
MuteDuration::MutedUntilTimestamp(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user