handletelegram: fix disabling disappearing timer

This commit is contained in:
Tulir Asokan
2025-09-13 01:39:32 +03:00
parent 8f998cd9cb
commit 34683e6d1b
5 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
-- v0 -> v3 (compatible with v2+): Latest revision
-- v0 -> v4 (compatible with v2+): Latest revision
CREATE TABLE telegram_user_state (
user_id BIGINT NOT NULL PRIMARY KEY,
@@ -0,0 +1,4 @@
-- v4 (compatible with v2+): Clear invalid disappearing timers in portal table
UPDATE portal
SET disappear_type=NULL, disappear_timer=NULL
WHERE disappear_timer=0 OR disappear_timer IS NULL OR disappear_type IS NULL;
+1 -1
View File
@@ -359,7 +359,7 @@ func (t *TelegramClient) onUpdateNewMessage(ctx context.Context, entities tg.Ent
setting := database.DisappearingSetting{
Type: event.DisappearingTypeAfterSend,
Timer: time.Duration(action.Period) * time.Second,
}
}.Normalize()
res := t.main.Bridge.QueueRemoteEvent(t.userLogin, &simplevent.ChatInfoChange{
EventMeta: eventMeta.WithType(bridgev2.RemoteEventChatInfoChange),
ChatInfoChange: &bridgev2.ChatInfoChange{