diff --git a/JetHerald/Db.cs b/JetHerald/Db.cs index 50b364b..7cf4960 100644 --- a/JetHerald/Db.cs +++ b/JetHerald/Db.cs @@ -146,7 +146,7 @@ namespace JetHerald { using var c = GetConnection(); return c.QueryAsync( - " SELECT tc.Chat, tc.Service, t.Description, t.ExpiryTime" + + " SELECT tc.Chat, t.Description, t.ExpiryTime" + " FROM topic_chat tc" + " INNER JOIN topic t ON t.TopicId = tc.TopicId" + " WHERE t.ExpiryTime < CURRENT_TIMESTAMP() AND NOT t.ExpiryMessageSent",