kopia lustrzana https://github.com/jointakahe/takahe
set Block state back to new if user update mute settings
rodzic
354c09a76d
commit
fc295cfe3c
|
@ -195,8 +195,7 @@ class Block(StatorModel):
|
||||||
raise ValueError("You cannot mute from a remote Identity")
|
raise ValueError("You cannot mute from a remote Identity")
|
||||||
block = cls.maybe_get(source=source, target=target, mute=True)
|
block = cls.maybe_get(source=source, target=target, mute=True)
|
||||||
if block is not None:
|
if block is not None:
|
||||||
if not block.active:
|
block.state = BlockStates.new # type:ignore
|
||||||
block.state = BlockStates.new # type:ignore
|
|
||||||
if duration:
|
if duration:
|
||||||
block.expires = timezone.now() + datetime.timedelta(seconds=duration)
|
block.expires = timezone.now() + datetime.timedelta(seconds=duration)
|
||||||
block.include_notifications = include_notifications
|
block.include_notifications = include_notifications
|
||||||
|
|
Ładowanie…
Reference in New Issue