History Polling: Message-ID-basiert, neuer /api/history/poll Endpoint

This commit is contained in:
Meleki committed 2026-02-26 15:54:01 +01:00
1 parent 19f926da05
commit fb2c3a0720
5 files changed
+90 -25

No files matched your search

+9
View File
@@ -135,4 +135,13 @@ public class DatabaseService
"SELECT * FROM messages WHERE chain_id = @chainId ORDER BY id", new { chainId }
);
}
public async Task<IEnumerable<MessageRecord>> GetMessagesAfterId(long afterId, int limit = 200)
{
using var conn = CreateConnection();
return await conn.QueryAsync<MessageRecord>(
"SELECT * FROM messages WHERE id > @afterId ORDER BY id LIMIT @limit",
new { afterId, limit }
);
}
}