@Sir_Indy Oh, it isn't solely for your benefit ;-) It would also allow me to remove duplicate code from smessages, and just use the default messages library.
I made a PR for message events. With those changes you could do something like this:
// aanotifi.boot.js
Bangle.on("message", (type, message)=> {
if (type !== "text") return; // let default app handle e.g. "music" or "call"
require("notify").show(message);
require("messages").buzz(message.src);
message.handled = true; // prevent default app from launching
});
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Sir_Indy Oh, it isn't solely for your benefit ;-) It would also allow me to remove duplicate code from
smessages
, and just use the default messages library.I made a PR for message events. With those changes you could do something like this: