@gudhub/core 1.1.83 → 1.1.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1308,6 +1308,13 @@ export default function generateModulesList(async_modules_path, file_server_url,
|
|
|
1308
1308
|
url: file_server_url + '/' + automation_modules_path + 'fireworks_node.js',
|
|
1309
1309
|
type: 'automation',
|
|
1310
1310
|
icon: 'weeding_party'
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
data_type: 'SendMessage',
|
|
1314
|
+
name: 'Send Message',
|
|
1315
|
+
url: file_server_url + '/' + automation_modules_path + 'send_message.js',
|
|
1316
|
+
type: 'automation',
|
|
1317
|
+
icon: 'speech_bubble'
|
|
1311
1318
|
}
|
|
1312
1319
|
]
|
|
1313
1320
|
}
|
package/GUDHUB/Utils/Utils.js
CHANGED
|
@@ -217,4 +217,14 @@ export class Utils {
|
|
|
217
217
|
sortItems(items, options) {
|
|
218
218
|
return sortItems(items, options);
|
|
219
219
|
}
|
|
220
|
+
|
|
221
|
+
debounce(func, delay) {
|
|
222
|
+
let timeoutId;
|
|
223
|
+
return function (...args) {
|
|
224
|
+
clearTimeout(timeoutId);
|
|
225
|
+
timeoutId = setTimeout(() => {
|
|
226
|
+
func.apply(this, args);
|
|
227
|
+
}, delay);
|
|
228
|
+
};
|
|
229
|
+
}
|
|
220
230
|
}
|
package/GUDHUB/gudhub.js
CHANGED
|
@@ -152,6 +152,11 @@ export class GudHub {
|
|
|
152
152
|
);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
//============ DEBOUNCE ========//
|
|
156
|
+
debounce(func, delay) {
|
|
157
|
+
return this.util.debounce(func, delay);
|
|
158
|
+
}
|
|
159
|
+
|
|
155
160
|
//************************* WEBSOCKETS EMITTER ****************************//
|
|
156
161
|
|
|
157
162
|
emitToUser(user_id, data) {
|