five-on-it / packages/protocol/src/messages / parsePhone
Function: parsePhone()
parsePhone(
text): {apps:object[];calls:object[];camera?: {note?:"missed"|"subject"|"away"|"saved";shots:number; };contacts:object[];has:boolean;messages:object[];screen?: {app:string;buttons:object[];form:object[];kind:"keypad"|"app";name:string;note?:string;noteKey?:"wrongCode"|"nothing";source:"phone"|"world";text:string;title?:string; };talk?: {choices:object[];dialogue:string;goesOn:boolean;line?:string;note?:string;speaker?:string;state:"ringing"|"talking";via:"call"|"face";with:string; };type:"phone";unread:number;waypoint?: {label?:string;x:number;z:number; }; } |undefined
Defined in: packages/protocol/src/messages.ts:1100
Parses a text frame as a phone; undefined when it is not one.
Parameters
text
string
Returns
{ apps: object[]; calls: object[]; camera?: { note?: "missed" | "subject" | "away" | "saved"; shots: number; }; contacts: object[]; has: boolean; messages: object[]; screen?: { app: string; buttons: object[]; form: object[]; kind: "keypad" | "app"; name: string; note?: string; noteKey?: "wrongCode" | "nothing"; source: "phone" | "world"; text: string; title?: string; }; talk?: { choices: object[]; dialogue: string; goesOn: boolean; line?: string; note?: string; speaker?: string; state: "ringing" | "talking"; via: "call" | "face"; with: string; }; type: "phone"; unread: number; waypoint?: { label?: string; x: number; z: number; }; } | undefined