matrix: use Normalize instead of manually changing disappearing type
This commit is contained in:
@@ -730,10 +730,7 @@ func (t *TelegramClient) HandleMatrixDisappearingTimer(ctx context.Context, msg
|
|||||||
msg.Portal.Disappear = database.DisappearingSetting{
|
msg.Portal.Disappear = database.DisappearingSetting{
|
||||||
Type: event.DisappearingTypeAfterRead,
|
Type: event.DisappearingTypeAfterRead,
|
||||||
Timer: msg.Content.Timer.Duration,
|
Timer: msg.Content.Timer.Duration,
|
||||||
}
|
}.Normalize()
|
||||||
if msg.Portal.Disappear.Timer == 0 {
|
|
||||||
msg.Portal.Disappear.Type = event.DisappearingTypeNone
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return err == nil, err
|
return err == nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user