Open mStirner opened 6 months ago
Add actions to notifications (responses), like buttons/inputs.
Draft:
const Joi = require("joi"); module.exports = class Action { constructor(options, cb) { this.options = Object.assign({ }, options); Object.defineProperty(this, "callback", { value: cb, enumerable: false, configurable: false, writable: false }); } static schema() { return Joi.object({ title: Joi.string().required(), type: Joi.string().valid("boolean", "string", "number"), display: Joi.string().valid("input", "button") }); } static validate(data) { return Action.schema().validate(data); } apply(value) { this.callback(value); } };
Comparable to gotify actions: https://gotify.net/docs/msgextras#androidaction
Add actions to notifications (responses), like buttons/inputs.
Draft:
Comparable to gotify actions: https://gotify.net/docs/msgextras#androidaction