handletelegram: fix disabling disappearing timer
This commit is contained in:
@@ -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;
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user