mirror of
https://github.com/mautrix/telegram.git
synced 2026-05-17 07:25:46 +03:00
tomatrix: don't use portal disappearing timer for incoming messages
This commit is contained in:
@@ -223,16 +223,10 @@ func (c *TelegramClient) convertToMatrix(
|
||||
}
|
||||
}
|
||||
|
||||
if disappearingSetting == nil {
|
||||
// The TTL is either included in the message, or it's on the portal's
|
||||
// metadata.
|
||||
if ttl, ok := msg.GetTTLPeriod(); ok {
|
||||
cm.Disappear = database.DisappearingSetting{
|
||||
Type: event.DisappearingTypeAfterSend,
|
||||
Timer: time.Duration(ttl) * time.Second,
|
||||
}
|
||||
} else {
|
||||
cm.Disappear = portal.Disappear
|
||||
if ttl, ok := msg.GetTTLPeriod(); ok && disappearingSetting == nil {
|
||||
cm.Disappear = database.DisappearingSetting{
|
||||
Type: event.DisappearingTypeAfterSend,
|
||||
Timer: time.Duration(ttl) * time.Second,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user