UNPKG

chamesu

Version:

This package contains all packages of the chat application.

15 lines (13 loc) 405 B
/* * Copyright (c) 2022. * Author Peter Placzek (tada5hi) * For the full copyright and license information, * view the LICENSE file that was distributed with this source code. */ export function getContactOtherUserId(contact: Record<string, any>, ownUserId: number) { if(contact.userOneId === ownUserId) { return contact.userTwoId; } else { return contact.userOneId; } }