mirror of
https://github.com/CamHenlin/MessagesForMacintosh.git
synced 2024-11-21 19:30:51 +00:00
fix issue where return value from sendMessage would not make it back through to mac app
This commit is contained in:
parent
cfcf7566f5
commit
dfe9dd565a
20
JS/index.js
20
JS/index.js
@ -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 () {
|
||||
|
BIN
dist/MessagesForMacintosh.dsk
vendored
BIN
dist/MessagesForMacintosh.dsk
vendored
Binary file not shown.
BIN
dist/MessagesForMacintosh.zip
vendored
BIN
dist/MessagesForMacintosh.zip
vendored
Binary file not shown.
10
mac_main.c
10
mac_main.c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user