@dlghq/dialog-types
Advanced tools
Comparing version 1.32.0 to 1.32.1
{ | ||
"name": "@dlghq/dialog-types", | ||
"version": "1.32.0", | ||
"version": "1.32.1", | ||
"description": "Flow types for dialog projects", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
16
utils.js
@@ -33,2 +33,18 @@ /* | ||
export function peerToApi(peer: Peer) { | ||
switch (peer.type) { | ||
case 'user': | ||
return { type: 'private', id: peer.id, strId: null }; | ||
case 'group': | ||
return { type: 'group', id: peer.id, strId: null }; | ||
case 'sip': | ||
return { type: 'sip', id: peer.id, strId: peer.key }; | ||
default: | ||
throw new Error(`Unexpected peer type: ${peer.type}`); | ||
} | ||
} | ||
export function isSamePeer(peer1: ?Peer, peer2: ?Peer): boolean { | ||
@@ -35,0 +51,0 @@ if (peer1 && peer2) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23238
549