Centralize clientId creation
Summary: One step towards getting away from constructing and destructing clientIds manually everywhere by splitting and joining #'s. Which has been VERY error prone in the past. Reviewed By: passy Differential Revision: D18809442 fbshipit-source-id: bd4d89d3eb3d59694aa735b19dbd73d122e59ba0
This commit is contained in:
committed by
Facebook Github Bot
parent
ab5892c60e
commit
15e1b25098
@@ -47,3 +47,12 @@ export function getCurrentAppName(client: string | undefined | null): string {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
export function buildClientId(clientInfo: {
|
||||
app: string;
|
||||
os: string;
|
||||
device: string;
|
||||
device_id: string;
|
||||
}): string {
|
||||
return `${clientInfo.app}#${clientInfo.os}#${clientInfo.device}#${clientInfo.device_id}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user