INNER CODE UNIT · TypeScript

trackedContacts

gommzystudio/device-activity-tracker · src/server.ts:257

    const trackedContacts = Array.from(trackers.entries()).map(([id, entry]) => ({
        id,
        platform: entry.platform
    }));

    // Handle request to get tracked contacts (for page refresh)
    socket.on('get-tracked-contacts', () => {
        const trackedContacts = Array.from(trackers.entries()).map(([id, entry]) => ({
            id,
            platform: entry.platform
        }));
        socket.emit('tracked-contacts', trackedContacts);
    });

    // Add contact - supports both WhatsApp and Signal
    socket.on('add-contact', async (data: string | { number: string; platform: Platform }) => {
        // Support both old format (string) and new format (object)
        const { number, platform } = typeof data === 'string'

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…