webfast 0.1.42 → 0.1.44

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.
@@ -285,14 +285,20 @@ jQuery(document).ready(function() {
285
285
  }
286
286
 
287
287
  const webFastFunc = jQuery(this).attr(`webfast-func`);
288
- web.fast.sendMessage(`socket.api.${webAction}`,{
289
- ts : Date.now(),
290
- ell : jQuery(this).attr(`id`),
291
- other : other,
292
- action : action,
293
- webAction : webAction,
294
- function : webFastFunc
288
+
289
+ // Create que instead of sending quick
290
+ web.fast.que.list.push({
291
+ path : `socket.api.${webAction}`,
292
+ message : {
293
+ ts : Date.now(),
294
+ ell : jQuery(this).attr(`id`),
295
+ other : other,
296
+ action : action,
297
+ webAction : webAction,
298
+ function : webFastFunc
299
+ }
295
300
  })
301
+
296
302
  break;
297
303
  case "BUTTON":
298
304
  // Check button interaction
@@ -42,6 +42,9 @@ module.exports = async function(program,folder) {
42
42
  let middleValue = body[key];
43
43
  // Check for split
44
44
  // Try for message
45
+ if (middleValue.chat == undefined) {
46
+ middleValue.chat = {}
47
+ }
45
48
  middleValue.chat.ts = Date.now();
46
49
  middleValue.chat.uuid = program.uuid.v4();
47
50
  let user = await program.modules.data.findOrCreate(`eventgo`,`telegram`,{
@@ -2,6 +2,10 @@ module.exports = {
2
2
  dependOn : [`express.app`],
3
3
  name : 'bot',
4
4
  run : async function(program,name) {
5
+ if (process.env.bot == 'false') {
6
+ return false;
7
+ }
8
+
5
9
  console.log(`Running ${name}`);
6
10
  // Scan bots folder and exclude
7
11
  const routesPath = program.path.join(__dirname,`applications`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webfast",
3
- "version": "0.1.42",
3
+ "version": "0.1.44",
4
4
  "description": "WebFast! Bot Application, including TON mini-apps for makign it easy and fast to build ini-apps",
5
5
  "main": "index.js",
6
6
  "repository": {