feat: Update how messages load and sync, allow plugins to import messages
All checks were successful
Queue Release Build / prepare (push) Successful in 23s
Deploy Web Apps / deploy (push) Successful in 7m36s
Queue Release Build / build-windows (push) Successful in 28m3s
Queue Release Build / build-linux (push) Successful in 44m14s
Queue Release Build / finalize (push) Successful in 39s
All checks were successful
Queue Release Build / prepare (push) Successful in 23s
Deploy Web Apps / deploy (push) Successful in 7m36s
Queue Release Build / build-windows (push) Successful in 28m3s
Queue Release Build / build-linux (push) Successful in 44m14s
Queue Release Build / finalize (push) Successful in 39s
This commit is contained in:
@@ -42,9 +42,21 @@ export class ElectronDatabaseService {
|
||||
* @param roomId - Target room.
|
||||
* @param limit - Maximum number of messages to return.
|
||||
* @param offset - Number of newer messages to skip (for pagination).
|
||||
* @param channelId - Optional channel scope; 'general' includes null/empty.
|
||||
* @param beforeTimestamp - Optional cursor; only messages strictly older
|
||||
* than this timestamp are returned (scroll-up paging).
|
||||
*/
|
||||
getMessages(roomId: string, limit = 100, offset = 0): Promise<Message[]> {
|
||||
return this.api.query<Message[]>({ type: 'get-messages', payload: { roomId, limit, offset } });
|
||||
getMessages(
|
||||
roomId: string,
|
||||
limit = 100,
|
||||
offset = 0,
|
||||
channelId?: string,
|
||||
beforeTimestamp?: number
|
||||
): Promise<Message[]> {
|
||||
return this.api.query<Message[]>({
|
||||
type: 'get-messages',
|
||||
payload: { roomId, limit, offset, channelId, beforeTimestamp }
|
||||
});
|
||||
}
|
||||
|
||||
getMessagesSince(roomId: string, sinceTimestamp: number): Promise<Message[]> {
|
||||
|
||||
Reference in New Issue
Block a user