History Polling: Message-ID-basiert, neuer /api/history/poll Endpoint
This commit is contained in:
1 parent
19f926da05
commit
fb2c3a0720
5 files changed
+90
-25
No files matched your search
@@ -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 }
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user