fix issue where return value from sendMessage would not make it back through to mac app

This commit is contained in:
camh 2022-02-04 23:30:50 -08:00
parent cfcf7566f5
commit dfe9dd565a
4 changed files with 17 additions and 13 deletions

View File

@ -437,7 +437,7 @@ class iMessageGraphClientClass {
try {
message = message.replaceAll('"', '')
message = encodeURIComponent(message)
result = await client.query({
query: gql`query sendMessage {
@ -457,7 +457,9 @@ class iMessageGraphClientClass {
let messages = result.data.sendMessage
return splitMessages(messages)
storedArgsAndResults.getMessages.output = splitMessages(messages)
return storedArgsAndResults.getMessages.output
}
async getChats () {
@ -628,10 +630,10 @@ class iMessageClient {
return
}
// if (DEBUG) {
if (DEBUG) {
console.log(`${intervalDate}: running...`)
// }
}
try {
@ -651,10 +653,10 @@ class iMessageClient {
console.log(error)
}
// if (DEBUG) {
if (DEBUG) {
console.log(`${intervalDate}: complete!`)
// }
}
}, 3000)
}
@ -687,9 +689,11 @@ class iMessageClient {
async sendMessage (chatId, message) {
console.log(`iMessageClient.sendMessage`)
console.log(`iMessageClient.sendMessage(${chatId}, ${message})`)
return await iMessageGraphClient.sendMessage(chatId, message)
const messages = await iMessageGraphClient.sendMessage(chatId, message)
return messages
}
async getChats () {

Binary file not shown.

Binary file not shown.

View File

@ -163,7 +163,7 @@ int main()
coprocessorLoaded = 1;
EventLoop(ctx); /* call the main event loop */
EventLoop(ctx);
return 0;
}
@ -249,14 +249,14 @@ void EventLoop(struct nk_context *ctx)
GlobalToLocal(&tempPoint);
if (!beganInput) {
nk_input_begin(ctx);
beganInput = true;
}
nk_input_motion(ctx, tempPoint.h, tempPoint.v);
firstOrMouseMove = true;
beganInput = true;
mouse_x = tempPoint.h;
mouse_y = tempPoint.v;
@ -366,12 +366,12 @@ void EventLoop(struct nk_context *ctx)
writeSerialPortDebug(boutRefNum, "nk_input_render complete");
#endif
// again, don't do this
// #ifdef PROFILING
// PROFILE_END("eventloop");
// #endif
} while ( true ); /* loop forever; we quit via ExitToShell */
} /*EventLoop*/
}
/* Do the right thing for an event. Determine what kind of event it is, and call