Facebook History Sync Utility (shared/facebookHistorySync.ts)

deplao-builder · src/shared/facebookHistorySync.ts · typescript · MIT
ui, integration, chat, lang:typescript, fw:electron, tag:embed-classified, tag:sync

Synchronizes Facebook message history across specified time ranges via bridge tasks. Reuse when implementing message history synchronization and backup features.

// Source: https://github.com/babyvibe/deplao-builder | License: MIT | Copyright 2026 babyvibe
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Đồng bộ tin nhắn Facebook theo khoảng thời gian (popup giống "Đồng bộ tin nhắn từ điện thoại" của Zalo): tải lịch sử
 * từng hội thoại qua bridge (LightSpeed FetchMessagesTask, lùi theo mốc thời gian) cho tới khi phủ hết khoảng đã chọn —
 * không giới hạn số tin; mỗi trang lưu ngay. Kiểu trạng thái dùng chung main ↔ renderer + quy tắc thuần
 * (test: src/__tests__/facebookHistorySync.test.ts).
 */

export type FbHistorySyncStage = 'idle' | 'listing' | 'syncing' | 'completed' | 'failed' | 'cancelled';

/** ms; null = không giới hạn phía đó (fromTs null + toTs null = toàn bộ lịch sử). */
export interface FbHistorySyncRange {
  

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key