From 65ecd0c1ee93abfd604e52982d809ca1ea2bd0f0 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Fri, 17 Jul 2020 13:20:30 -0700 Subject: [PATCH 01/15] cors header for desktop --- app.ts | 2 +- dist/app.js | 2 +- dist/app.js.map | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app.ts b/app.ts index f72fee242..1a9300bdf 100644 --- a/app.ts +++ b/app.ts @@ -63,7 +63,7 @@ async function setupApp(){ app.use((req, res, next) => { res.setHeader('Access-Control-Allow-Origin', 'http://localhost:8080'); res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE'); - res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, Accept'); + res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, Accept, x-user-token'); res.setHeader('Cache-Control', 'private, no-cache, no-store, must-revalidate'); res.setHeader('Expires', '-1'); res.setHeader('Pragma', 'no-cache'); diff --git a/dist/app.js b/dist/app.js index 685dcb2f8..d8832d646 100644 --- a/dist/app.js +++ b/dist/app.js @@ -72,7 +72,7 @@ function setupApp() { app.use((req, res, next) => { res.setHeader('Access-Control-Allow-Origin', 'http://localhost:8080'); res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE'); - res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, Accept'); + res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, Accept, x-user-token'); res.setHeader('Cache-Control', 'private, no-cache, no-store, must-revalidate'); res.setHeader('Expires', '-1'); res.setHeader('Pragma', 'no-cache'); diff --git a/dist/app.js.map b/dist/app.js.map index 7b878baa2..96e74e526 100644 --- a/dist/app.js.map +++ b/dist/app.js.map @@ -1 +1 @@ -{"version":3,"file":"app.js","sourceRoot":"","sources":["../app.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAkC;AAClC,0CAAyC;AACzC,iCAAgC;AAChC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Date: Fri, 17 Jul 2020 13:24:11 -0700 Subject: [PATCH 02/15] use npm cors --- app.ts | 12 ++---------- dist/app.js | 12 ++---------- dist/app.js.map | 2 +- package-lock.json | 11 ++++++++++- package.json | 1 + 5 files changed, 16 insertions(+), 22 deletions(-) diff --git a/app.ts b/app.ts index 1a9300bdf..d2b289be1 100644 --- a/app.ts +++ b/app.ts @@ -2,6 +2,7 @@ import * as express from 'express' import * as bodyParser from 'body-parser' import * as helmet from 'helmet' import * as cookieParser from 'cookie-parser' +import * as cors from 'cors' import * as crypto from 'crypto' import * as path from 'path' import {models} from './api/models' @@ -59,16 +60,7 @@ async function setupApp(){ app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(logger) - app.options('*', (req, res) => res.send(200)); - app.use((req, res, next) => { - res.setHeader('Access-Control-Allow-Origin', 'http://localhost:8080'); - res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE'); - res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, Accept, x-user-token'); - res.setHeader('Cache-Control', 'private, no-cache, no-store, must-revalidate'); - res.setHeader('Expires', '-1'); - res.setHeader('Pragma', 'no-cache'); - next(); - }); + app.use(cors()) app.use(cookieParser()) if (env != 'development') { app.use(authModule); diff --git a/dist/app.js b/dist/app.js index d8832d646..c8dd7a3d2 100644 --- a/dist/app.js +++ b/dist/app.js @@ -13,6 +13,7 @@ const express = require("express"); const bodyParser = require("body-parser"); const helmet = require("helmet"); const cookieParser = require("cookie-parser"); +const cors = require("cors"); const crypto = require("crypto"); const path = require("path"); const models_1 = require("./api/models"); @@ -68,16 +69,7 @@ function setupApp() { app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(logger_1.default); - app.options('*', (req, res) => res.send(200)); - app.use((req, res, next) => { - res.setHeader('Access-Control-Allow-Origin', 'http://localhost:8080'); - res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE'); - res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, Accept, x-user-token'); - res.setHeader('Cache-Control', 'private, no-cache, no-store, must-revalidate'); - res.setHeader('Expires', '-1'); - res.setHeader('Pragma', 'no-cache'); - next(); - }); + app.use(cors()); app.use(cookieParser()); if (env != 'development') { app.use(authModule); diff --git a/dist/app.js.map b/dist/app.js.map index 96e74e526..9879ae0b2 100644 --- a/dist/app.js.map +++ b/dist/app.js.map @@ -1 +1 @@ -{"version":3,"file":"app.js","sourceRoot":"","sources":["../app.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAkC;AAClC,0CAAyC;AACzC,iCAAgC;AAChC,8CAA6C;AAC7C,iCAAgC;AAChC,6BAA4B;AAC5B,yCAAmC;AACnC,+CAAuC;AACvC,mCAAkE;AAClE,6CAA0D;AAC1D,iDAAgD;AAChD,6CAA4C;AAC5C,yCAAwC;AAExC,IAAI,MAAM,GAAQ,IAAI,CAAA;AACtB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC;AACtC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAErE,OAAO,CAAC,GAAG,CAAC,sBAAsB,GAAG,YAAY,CAAA;AAEjD,IAAI,CAAC,GAAG,CAAC,CAAA;AAET,eAAe;AACf,YAAY,EAAE,CAAA;AAEd,SAAe,YAAY;;QAC1B,CAAC,EAAE,CAAA;QACH,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,EAAE,CAAC,CAAA;QACnD,IAAI;YACH,MAAM,OAAO,CAAC,qBAAqB,EAAE,CAAA,CAAG,MAAM;YAC9C,MAAM,SAAS,EAAE,CAAA,CAAM,eAAe;YACtC,MAAM,OAAO,CAAC,uBAA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AA;YACnC,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,EAAE;gBAC7B,IAAI,EAAE,CAAA;gBACN,OAAM;aACN;SACD;QAED,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAA;QAExE,IAAI,KAAK,IAAI,IAAI,EAAE;YAClB,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,yBAAyB,EAAE,EAAC,cAAc,EAAG,YAAY,EAAC,CAAC,CAAC;YAC5E,GAAG,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;SAClC;aAAM;YACN,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAC,CAAC,CAAA;YACtE,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC/E,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,IAAI,WAAW,EAAE;gBAC5D,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,yBAAyB,EAAE,EAAC,cAAc,EAAG,YAAY,EAAC,CAAC,CAAC;gBAC/E,GAAG,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;aAC/B;iBAAM;gBACN,IAAI,EAAE,CAAC;aACP;SACD;IACF,CAAC;CAAA;AAED,kBAAe,MAAM,CAAA"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 86e8050d0..82bb04389 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3058,6 +3058,15 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, "create-ecdh": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", @@ -5671,7 +5680,7 @@ "dependencies": { "debug": { "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "resolved": false, "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "requires": { "ms": "^2.1.1" diff --git a/package.json b/package.json index 757283059..4d7ea238c 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "bytebuffer": "^5.0.1", "change-case": "^4.1.1", "cookie-parser": "^1.4.4", + "cors": "^2.8.5", "cron": "^1.7.2", "cron-parser": "^2.13.0", "crypto-browserify": "^3.12.0", From 463dc7f14ca10fa17c08ab425c7b1e60eb5a2656 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Fri, 17 Jul 2020 13:33:08 -0700 Subject: [PATCH 03/15] dont use Access-Control-Request-Headers --- app.ts | 4 +++- dist/app.js | 4 +++- dist/app.js.map | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app.ts b/app.ts index d2b289be1..f27d61588 100644 --- a/app.ts +++ b/app.ts @@ -60,7 +60,9 @@ async function setupApp(){ app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(logger) - app.use(cors()) + app.use(cors({ + allowedHeaders:['X-Requested-With','Content-Type','Accept','x-user-token'] + })) app.use(cookieParser()) if (env != 'development') { app.use(authModule); diff --git a/dist/app.js b/dist/app.js index c8dd7a3d2..6c3874368 100644 --- a/dist/app.js +++ b/dist/app.js @@ -69,7 +69,9 @@ function setupApp() { app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(logger_1.default); - app.use(cors()); + app.use(cors({ + allowedHeaders: ['X-Requested-With', 'Content-Type', 'Accept', 'x-user-token'] + })); app.use(cookieParser()); if (env != 'development') { app.use(authModule); diff --git a/dist/app.js.map b/dist/app.js.map index 9879ae0b2..7a959fb92 100644 --- a/dist/app.js.map +++ b/dist/app.js.map @@ -1 +1 @@ -{"version":3,"file":"app.js","sourceRoot":"","sources":["../app.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAkC;AAClC,0CAAyC;AACzC,iCAAgC;AAChC,8CAA6C;AAC7C,6BAA4B;AAC5B,iCAAgC;AAChC,6BAA4B;AAC5B,yCAAmC;AACnC,+CAAuC;AACvC,mCAAkE;AAClE,6CAA0D;AAC1D,iDAAgD;AAChD,6CAA4C;AAC5C,yCAAwC;AAExC,IAAI,MAAM,GAAQ,IAAI,CAAA;AACtB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC;AACtC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAErE,OAAO,CAAC,GAAG,CAAC,sBAAsB,GAAG,YAAY,CAAA;AAEjD,IAAI,CAAC,GAAG,CAAC,CAAA;AAET,eAAe;AACf,YAAY,EAAE,CAAA;AAEd,SAAe,YAAY;;QAC1B,CAAC,EAAE,CAAA;QACH,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,EAAE,CAAC,CAAA;QACnD,IAAI;YACH,MAAM,OAAO,CAAC,qBAAqB,EAAE,CAAA,CAAG,MAAM;YAC9C,MAAM,SAAS,EAAE,CAAA,CAAM,eAAe;YACtC,MAAM,OAAO,CAAC,uBAAu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,EAAE,IAAI,EAAE,EAAC,CAAC,CAAA;YACtE,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC/E,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,IAAI,WAAW,EAAE;gBAC5D,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,yBAAyB,EAAE,EAAC,cAAc,EAAG,YAAY,EAAC,CAAC,CAAC;gBAC/E,GAAG,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;aAC/B;iBAAM;gBACN,IAAI,EAAE,CAAC;aACP;SACD;IACF,CAAC;CAAA;AAED,kBAAe,MAAM,CAAA"} \ No newline at end of file From 33182735399e4e6d249e3c7d787683af519642f7 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Fri, 17 Jul 2020 13:36:39 -0700 Subject: [PATCH 04/15] add orgiins check to socketio --- api/utils/socket.ts | 2 +- dist/api/utils/socket.js | 2 +- dist/api/utils/socket.js.map | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/utils/socket.ts b/api/utils/socket.ts index 124aff724..882e3f0d1 100644 --- a/api/utils/socket.ts +++ b/api/utils/socket.ts @@ -10,7 +10,7 @@ let io: any export function connect(server) { // srvr = new WebSocket.Server({ server, clientTracking:true }) - io = socketio(server); + io = socketio(server, {origins: '*:*'}); io.use(async (socket, next) => { let userToken = socket.handshake.headers['x-user-token']; const isValid = await isValidToken(userToken) diff --git a/dist/api/utils/socket.js b/dist/api/utils/socket.js index 3ad4d713e..ce11a3c78 100644 --- a/dist/api/utils/socket.js +++ b/dist/api/utils/socket.js @@ -17,7 +17,7 @@ let io; // let srvr: any function connect(server) { // srvr = new WebSocket.Server({ server, clientTracking:true }) - io = socketio(server); + io = socketio(server, { origins: '*:*' }); io.use((socket, next) => __awaiter(this, void 0, void 0, function* () { let userToken = socket.handshake.headers['x-user-token']; const isValid = yield isValidToken(userToken); diff --git a/dist/api/utils/socket.js.map b/dist/api/utils/socket.js.map index 8d95a2647..3fa169a99 100644 --- a/dist/api/utils/socket.js.map +++ b/dist/api/utils/socket.js.map @@ -1 +1 @@ -{"version":3,"file":"socket.js","sourceRoot":"","sources":["../../../api/utils/socket.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,iCAAgC;AAEhC,kCAAkC;AAClC,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAEtC,IAAI,EAAO,CAAA;AACX,gBAAgB;AAEhB,SAAgB,OAAO,CAAC,MAAM;IAC5B,+DAA+D;IAE/D,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IACtB,EAAE,CAAC,GAAG,CAAC,CAAO,MAAM,EAAE,IAAI,EAAE,EAAE;QAC5B,IAAI,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QACzD,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,SAAS,CAAC,CAAA;QAC7C,IAAI,OAAO,EAAE;YACX,OAAO,IAAI,EAAE,CAAC;SACf;QACD,OAAO,IAAI,CAAC,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC;IACjD,CAAC,CAAA,CAAC,CAAC;IACH,EAAE,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE;QAC3B,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC;AAfD,0BAeC;AAED,SAAe,YAAY,CAAC,KAAY;;QACtC,IAAG,CAAC,KAAK;YAAE,OAAO,KAAK,CAAA;QACvB,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAC,CAAC,CAAA;QACtE,MAAM,WAA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feenstra Date: Fri, 17 Jul 2020 13:39:12 -0700 Subject: [PATCH 05/15] socketio handlePreflightRequest --- api/utils/socket.ts | 12 +++++++++++- dist/api/utils/socket.js | 12 +++++++++++- dist/api/utils/socket.js.map | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/api/utils/socket.ts b/api/utils/socket.ts index 882e3f0d1..2ef443247 100644 --- a/api/utils/socket.ts +++ b/api/utils/socket.ts @@ -10,7 +10,17 @@ let io: any export function connect(server) { // srvr = new WebSocket.Server({ server, clientTracking:true }) - io = socketio(server, {origins: '*:*'}); + io = socketio(server, { + handlePreflightRequest: (req, res) => { + const headers = { + "Access-Control-Allow-Headers": "Content-Type, Accept, x-user-token, X-Requested-With", + "Access-Control-Allow-Origin": req.headers.origin, //or the specific origin you want to give access to, + "Access-Control-Allow-Credentials": true + }; + res.writeHead(200, headers); + res.end(); + } + }); io.use(async (socket, next) => { let userToken = socket.handshake.headers['x-user-token']; const isValid = await isValidToken(userToken) diff --git a/dist/api/utils/socket.js b/dist/api/utils/socket.js index ce11a3c78..c733f74e2 100644 --- a/dist/api/utils/socket.js +++ b/dist/api/utils/socket.js @@ -17,7 +17,17 @@ let io; // let srvr: any function connect(server) { // srvr = new WebSocket.Server({ server, clientTracking:true }) - io = socketio(server, { origins: '*:*' }); + io = socketio(server, { + handlePreflightRequest: (req, res) => { + const headers = { + "Access-Control-Allow-Headers": "Content-Type, Accept, x-user-token, X-Requested-With", + "Access-Control-Allow-Origin": req.headers.origin, + "Access-Control-Allow-Credentials": true + }; + res.writeHead(200, headers); + res.end(); + } + }); io.use((socket, next) => __awaiter(this, void 0, void 0, function* () { let userToken = socket.handshake.headers['x-user-token']; const isValid = yield isValidToken(userToken); diff --git a/dist/api/utils/socket.js.map b/dist/api/utils/socket.js.map index 3fa169a99..cbd804db0 100644 --- a/dist/api/utils/socket.js.map +++ b/dist/api/utils/socket.js.map @@ -1 +1 @@ -{"version":3,"file":"socket.js","sourceRoot":"","sources":["../../../api/ut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,CAAC,CAAC,CAAA;AAC9B,CAAC,CAAA"} \ No newline at end of file From 4457e5817ad534c6277ddff71d15e6b6be0ecb55 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Tue, 21 Jul 2020 12:48:47 -0700 Subject: [PATCH 06/15] logz --- api/controllers/contacts.ts | 4 +++- api/crypto/rsa.ts | 2 +- api/helpers.ts | 1 + api/utils/socket.ts | 6 +++--- dist/api/controllers/contacts.js | 4 ++++ dist/api/controllers/contacts.js.map | 2 +- dist/api/helpers.js | 1 + dist/api/helpers.js.map | 2 +- dist/api/utils/socket.js.map | 2 +- 9 files changed, 16 insertions(+), 8 deletions(-) diff --git a/api/controllers/contacts.ts b/api/controllers/contacts.ts index 4ed7685b0..659ea8b44 100644 --- a/api/controllers/contacts.ts +++ b/api/controllers/contacts.ts @@ -208,7 +208,7 @@ export const receiveContactKey = async (payload) => { const owner = await models.Contact.findOne({ where: { isOwner: true }}) const sender = await models.Contact.findOne({ where: { publicKey: sender_pub_key, status: constants.contact_statuses.confirmed }}) - + console.log("FOUND SENDER",sender&&sender.dataValue) if (sender_contact_key && sender) { const objToUpdate:{[k:string]:any} = {contactKey: sender_contact_key} if(sender_alias) objToUpdate.alias = sender_alias @@ -219,6 +219,8 @@ export const receiveContactKey = async (payload) => { type: 'contact', response: jsonUtils.contactToJson(sender) }) + } else { + console.log("DID NOT FIND SENDER") } helpers.sendContactKeys({ diff --git a/api/crypto/rsa.ts b/api/crypto/rsa.ts index 5836075ea..b645c95b5 100644 --- a/api/crypto/rsa.ts +++ b/api/crypto/rsa.ts @@ -13,7 +13,7 @@ export function encrypt(key, txt){ arr.forEach((_,i)=>{ const f = crypto.publicEncrypt({ key:pubc, - padding:crypto.constants.RSA_PKCS1_PADDING, + padding:crypto.constants.RSA_PKCS1_PADDING, // RSA_PKCS1_OAEP_PADDING }, buf.subarray(i*MAX_CHUNK_SIZE,i*MAX_CHUNK_SIZE+MAX_CHUNK_SIZE)) finalBuf = Buffer.concat([finalBuf,f]) }) diff --git a/api/helpers.ts b/api/helpers.ts index ce60ab4fd..d0fdf7d22 100644 --- a/api/helpers.ts +++ b/api/helpers.ts @@ -163,6 +163,7 @@ export async function parseReceiveParams(payload) { const owner = await models.Contact.findOne({ where: { isOwner: true } }) if (isConversation) { sender = await findOrCreateContactByPubkey(sender_pub_key) + console.log("CREATED CONTACT AUTOMATICALLY",sender&&sender.id) chat = await findOrCreateChatByUUID( chat_uuid, [parseInt(owner.id), parseInt(sender.id)] ) diff --git a/api/utils/socket.ts b/api/utils/socket.ts index 2ef443247..b3bb2391e 100644 --- a/api/utils/socket.ts +++ b/api/utils/socket.ts @@ -13,9 +13,9 @@ export function connect(server) { io = socketio(server, { handlePreflightRequest: (req, res) => { const headers = { - "Access-Control-Allow-Headers": "Content-Type, Accept, x-user-token, X-Requested-With", - "Access-Control-Allow-Origin": req.headers.origin, //or the specific origin you want to give access to, - "Access-Control-Allow-Credentials": true + "Access-Control-Allow-Headers": "Content-Type, Accept, x-user-token, X-Requested-With", + "Access-Control-Allow-Origin": req.headers.origin, //or the specific origin you want to give access to, + "Access-Control-Allow-Credentials": true }; res.writeHead(200, headers); res.end(); diff --git a/dist/api/controllers/contacts.js b/dist/api/controllers/contacts.js index aa46c52a1..d0bb0d5e2 100644 --- a/dist/api/controllers/contacts.js +++ b/dist/api/controllers/contacts.js @@ -184,6 +184,7 @@ exports.receiveContactKey = (payload) => __awaiter(void 0, void 0, void 0, funct } const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); const sender = yield models_1.models.Contact.findOne({ where: { publicKey: sender_pub_key, status: constants.contact_statuses.confirmed } }); + console.log("FOUND SENDER", sender && sender.dataValue); if (sender_contact_key && sender) { const objToUpdate = { contactKey: sender_contact_key }; if (sender_alias) @@ -196,6 +197,9 @@ exports.receiveContactKey = (payload) => __awaiter(void 0, void 0, void 0, funct response: jsonUtils.contactToJson(sender) }); } + else { + console.log("DID NOT FIND SENDER"); + } helpers.sendContactKeys({ contactPubKey: sender_pub_key, sender: owner, diff --git a/dist/api/controllers/contacts.js.map b/dist/api/controllers/contacts.js.map index b255ca158..77a9f7320 100644 --- a/dist/api/controllers/contacts.js.map +++ b/dist/api/controllers/contacts.js.map @@ -1 +1 @@ -{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../../api/controllers/contacts.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,iCAAgC;AAChC,0CAAyC;AACzC,sCAAqC;AACrC,2CAA0C;AAC1C,sCAA6C;AAC7C,gDAAwC;AACxC,6BAA4B;AAC5B,yCAA8B;AAE9B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAEhE,QAAA,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC7C,MAAM,QAAQ,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAC,EAAC,OAAO,EAAC,KAAK,EAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;IACnF,MAAM,OAAO,GAAG,MAAM,eAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;IAC1D,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAC,EAAC,OAAO,EAAC,KAAK,EAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;IAC7E,MAAM,aAAa,GAAG,MAAM,eAAM,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;IAEtE,MAAM,gBAAgB,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;QAC/C,IAAI,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QAClD,IAAI,MAAM,GAAG,OAAO,CAAC,IA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AC5D,MAAM,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAA;QAEhC,MAAM,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC;SACzC,CAAC,CAAA;KACF;AACF,CAAC,CAAA,CAAA;AAED,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE;IAC3B,IAAI,gBAAgB,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,oBAAoB,CAAC,CAAA;IACpK,IAAI,KAAK,GAAG,EAAE,CAAA;IACd,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QAC/B,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACnC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;SACtB;IACF,CAAC,CAAC,CAAA;IACF,OAAO,KAAK,CAAA;AACb,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/api/helpers.js b/dist/api/helpers.js index 24771dbf9..564f9812d 100644 --- a/dist/api/helpers.js +++ b/dist/api/helpers.js @@ -175,6 +175,7 @@ function parseReceiveParams(payload) { const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); if (isConversation) { sender = yield findOrCreateContactByPubkey(sender_pub_key); + console.log("CREATED CONTACT AUTOMATICALLY", sender && sender.id); chat = yield findOrCreateChatByUUID(chat_uuid, [parseInt(owner.id), parseInt(sender.id)]); if (sender.fromGroup) { // if a private msg received, update the contact yield sender.update({ fromGroup: false }); diff --git a/dist/api/helpers.js.map b/dist/api/helpers.js.map index 952abd136..3b1eaaaec 100644 --- a/dist/api/helpers.js.map +++ b/dist/api/helpers.js.map @@ -1 +1 @@ -{"version":3,"file":"helpers.js","sourceRoot":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B,CAAC,IAAI,EAAE,MAAM;IACtC,MAAM,eAAe,GAAG,MAAM,IAAI,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,YAAY,CAAA;IACzE,OAAO;QACN,IAAI,EAAE,IAAI;QACV,MAAM,gCACL,OAAO,EAAE,MAAM,CAAC,SAAS,EACzB,WAAW,EAAE,MAAM,CAAC,UAAU,IAC3B,MAAM,CAAC,KAAK,IAAI,EAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAC,GACrC,eAAe,IAAI,EAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAC,CAClD;KACD,CAAA;AACF,CAAC"} \ No newline at end of file diff --git a/dist/api/utils/socket.js.map b/dist/api/utils/socket.js.map index cbd804db0..f06b35481 100644 --- a/dist/api/utils/socket.js.map +++ b/dist/api/utils/socket.js.map @@ -1 +1 @@ -{"version":3,"file":"socket.js","sourceRoot":"","sources":["../../../api/utils/socket.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,iCAAgC;AAEhC,kCAAkC;AAClC,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAEtC,IAAI,EAAO,CAAA;AACX,gBAAgB;AAEhB,SAAgB,OAAO,CAAC,MAAM;IAC5B,+DAA+D;IAE/D,EAAE,GAAG,QAAQ,CAAC,MAAM,EAAE;QACpB,sBAAsB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YACnC,MAAM,OAAO,GAAG;gBACZ,8BAA8B,EAAE,sDAAsD;gBACtF,6BAA6B,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM;gBACjD,kCAAkC,EAAE,IAAI;aAC3C,CAAC;YACF,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;YAC5B,GAAG,CAAC,GAAG,EAAE,CAAC;QACZ,CAAC;KACF,CAAC,CAAC;IACH,EAAE,CAAC,GAAG,CAAC,CAAO,MAAM,EAAE,IAAI,EAAE,EA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,CAAC;AACL,CAAC;AAzBD,0BAyBC;AAED,SAAe,YAAY,CAAC,KAAY;;QACtC,IAAG,CAAC,KAAK;YAAE,OAAO,KAAK,CAAA;QACvB,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAC,CAAC,CAAA;QACtE,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC/E,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,IAAI,WAAW,EAAE;YAC3D,OAAO,KAAK,CAAA,CAAC,SAAS;SACvB;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CAAA;AAEY,QAAA,IAAI,GAAG,CAAC,IAAI,EAAE,EAAE;IAC3B,IAAG,EAAE;QAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAC,IAAI,CAAC,CAAA;IAEtC,YAAY;IACZ,8BAA8B;IAC9B,yBAAyB;IACzB,OAAO;IACP,IAAI;AACN,CAAC,CAAA;AAEY,QAAA,QAAQ,GAAG,CAAC,MAAM,EAAE,EAAE;IACjC,YAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAA;AAC9B,CAAC,CAAA"} \ No newline at end of file From f6608e2e6f597661eeb15a8d0ccc0a41c5e8f8f7 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Tue, 21 Jul 2020 14:28:50 -0700 Subject: [PATCH 07/15] cleaup --- api/hub.ts | 8 -------- api/network/send.ts | 8 ++++---- dist/api/hub.js | 8 -------- dist/api/hub.js.map | 2 +- dist/api/network/send.js | 10 ++++------ dist/api/network/send.js.map | 2 +- 6 files changed, 10 insertions(+), 28 deletions(-) diff --git a/api/hub.ts b/api/hub.ts index 5a73a3cc1..108ebc293 100644 --- a/api/hub.ts +++ b/api/hub.ts @@ -95,10 +95,6 @@ const sendHubCall = (params) => { body: JSON.stringify(params), headers: { 'Content-Type': 'application/json' } }) - .then(res => res.json()) - .then(json => { - // ? - }) .catch(error => { console.log('[hub error]', error) }) @@ -119,10 +115,6 @@ export function sendInvoice(payReq, amount) { body: JSON.stringify({invoice:payReq, amount}), headers: { 'Content-Type': 'application/json' } }) - .then(res => res.json()) - .then(json => { - // ? - }) .catch(error => { console.log('[hub error]', error) }) diff --git a/api/network/send.ts b/api/network/send.ts index 2f511761a..ec115cc69 100644 --- a/api/network/send.ts +++ b/api/network/send.ts @@ -84,7 +84,7 @@ export async function sendMessage(params) { console.log("KEYSEND ERROR", e) no = e } - await sleep(2) + // await sleep(2) }) if(yes){ if(success) success(yes) @@ -164,9 +164,9 @@ async function asyncForEach(array, callback) { await callback(array[index], index, array); } } -async function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)) -} +// async function sleep(ms) { +// return new Promise(resolve => setTimeout(resolve, ms)) +// } // function urlBase64FromHex(ascii){ // return Buffer.from(ascii,'hex').toString('base64').replace(/\//g, '_').replace(/\+/g, '-') diff --git a/dist/api/hub.js b/dist/api/hub.js index 5b9ffdd4a..048992829 100644 --- a/dist/api/hub.js +++ b/dist/api/hub.js @@ -89,10 +89,6 @@ const sendHubCall = (params) => { method: 'POST', body: JSON.stringify(params), headers: { 'Content-Type': 'application/json' } - }) - .then(res => res.json()) - .then(json => { - // ? }) .catch(error => { console.log('[hub error]', error); @@ -113,10 +109,6 @@ function sendInvoice(payReq, amount) { method: 'POST', body: JSON.stringify({ invoice: payReq, amount }), headers: { 'Content-Type': 'application/json' } - }) - .then(res => res.json()) - .then(json => { - // ? }) .catch(error => { console.log('[hub error]', error); diff --git a/dist/api/hub.js.map b/dist/api/hub.js.map index 54899d9b0..26d57e551 100644 --- a/dist/api/hub.js.map +++ b/dist/api/hub.js.map @@ -1 +1 @@ -{"version":3,"file":"hub.js","sourceRo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AA;AACtB,SAAS,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK;IAC/B,MAAM,OAAO,GAAG,IAAI,CAAA;IACpB,MAAM,IAAI,GAAG,SAAS,CAAA;IACtB,IAAG,cAAc,CAAC,EAAE,CAAC;QAAE,YAAY,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;IACvD,IAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QAAE,WAAW,CAAC,EAAE,CAAC,GAAC,CAAC,CAAA;IACtC,WAAW,CAAC,EAAE,CAAC,IAAE,CAAC,CAAA;IAClB,cAAc,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,GAAG,EAAE;QACnC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACzB,UAAU,CAAC,GAAE,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,GAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IACxC,CAAC,EAAE,KAAK,CAAC,CAAA;AACX,CAAC"} \ No newline at end of file diff --git a/dist/api/network/send.js b/dist/api/network/send.js index 4ee26d035..dfb16c825 100644 --- a/dist/api/network/send.js +++ b/dist/api/network/send.js @@ -89,7 +89,7 @@ function sendMessage(params) { console.log("KEYSEND ERROR", e); no = e; } - yield sleep(2); + // await sleep(2) })); if (yes) { if (success) @@ -165,11 +165,9 @@ function asyncForEach(array, callback) { } }); } -function sleep(ms) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise(resolve => setTimeout(resolve, ms)); - }); -} +// async function sleep(ms) { +// return new Promise(resolve => setTimeout(resolve, ms)) +// } // function urlBase64FromHex(ascii){ // return Buffer.from(ascii,'hex').toString('base64').replace(/\//g, '_').replace(/\+/g, '-') // } diff --git a/dist/api/network/send.js.map b/dist/api/network/send.js.map index 57805adc9..bfc85ab12 100644 --- a/dist/api/network/send.js.map +++ b/dist/api/network/send.js.map @@ -1 +1 @@ -{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../api/network/send.ts"],"names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CAAC,SAAS,IACtB,YAAY,IAAI,EAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAC,CAGxC;KACD,CAAA;AACF,CAAC;AAtBD,wBAsBC;AAED,SAAe,YAAY,CAAC,KAAK,EAAE,QAAQ;;QAC1C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAChD,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC7C;IACF,CAAC;CAAA;AACD,6BAA6B;AAC7B,0DAA0D;AAC1D,IAAI;AAEJ,oCAAoC;AACpC,iGAAiG;AACjG,IAAI;AACJ,oCAAoC;AACpC,yFAAyF;AACzF,IAAI"} \ No newline at end of file From f432d3c03d3f31a5ce5c77077c1742117fd406eb Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Tue, 21 Jul 2020 15:14:20 -0700 Subject: [PATCH 08/15] add msg.sender index, simplify some things --- api/hub.ts | 6 +++++- api/utils/setup.ts | 8 +++++++- dist/api/hub.js | 6 +++++- dist/api/hub.js.map | 2 +- dist/api/utils/setup.js | 8 +++++++- dist/api/utils/setup.js.map | 2 +- 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/api/hub.ts b/api/hub.ts index 108ebc293..367caa76f 100644 --- a/api/hub.ts +++ b/api/hub.ts @@ -21,6 +21,9 @@ const checkInviteHub = async (params = {}) => { //console.log('[hub] checking invites ping') const inviteStrings = await models.Invite.findAll({ where: { status: { [Op.notIn]: [constants.invite_statuses.complete, constants.invite_statuses.expired] } } }).map(invite => invite.inviteString) + if(inviteStrings.length===0) { + return // skip if no invites + } fetch(config.hub_api_url + '/invites/check', { method: 'POST' , @@ -279,6 +282,7 @@ function debounce(func, id, delay) { tribeCounts[id]+=1 bounceTimeouts[id] = setTimeout(() => { func.apply(context, args) - setTimeout(()=> tribeCounts[id]=0, 15) + // setTimeout(()=> tribeCounts[id]=0, 15) + tribeCounts[id]=0 }, delay) } diff --git a/api/utils/setup.ts b/api/utils/setup.ts index 6fb9c0039..18f002de3 100644 --- a/api/utils/setup.ts +++ b/api/utils/setup.ts @@ -6,7 +6,7 @@ import * as publicIp from 'public-ip' import password from '../utils/password' import {checkTag, checkCommitHash} from '../utils/gitinfo' -const USER_VERSION = 4 +const USER_VERSION = 5 const setupDatabase = async () => { console.log('=> [db] starting setup...') @@ -31,6 +31,12 @@ async function setVersion(){ } async function migrate(){ + try{ + await sequelize.query(`CREATE INDEX idx_messages_sender ON sphinx_messages (sender);`) + }catch(e){ + console.log(e) + } + addTableColumn('sphinx_contacts', 'notification_sound') try{ diff --git a/dist/api/hub.js b/dist/api/hub.js index 048992829..535d5aae4 100644 --- a/dist/api/hub.js +++ b/dist/api/hub.js @@ -28,6 +28,9 @@ const checkInviteHub = (params = {}) => __awaiter(void 0, void 0, void 0, functi const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); //console.log('[hub] checking invites ping') const inviteStrings = yield models_1.models.Invite.findAll({ where: { status: { [sequelize_1.Op.notIn]: [constants.invite_statuses.complete, constants.invite_statuses.expired] } } }).map(invite => invite.inviteString); + if (inviteStrings.length === 0) { + return; // skip if no invites + } fetch(config.hub_api_url + '/invites/check', { method: 'POST', body: JSON.stringify({ invite_strings: inviteStrings }), @@ -259,7 +262,8 @@ function debounce(func, id, delay) { tribeCounts[id] += 1; bounceTimeouts[id] = setTimeout(() => { func.apply(context, args); - setTimeout(() => tribeCounts[id] = 0, 15); + // setTimeout(()=> tribeCounts[id]=0, 15) + tribeCounts[id] = 0; }, delay); } //# sourceMappingURL=hub.js.map \ No newline at end of file diff --git a/dist/api/hub.js.map b/dist/api/hub.js.map index 26d57e551..4cc9754a3 100644 --- a/dist/api/hub.js.map +++ b/dist/api/hub.js.map @@ -1 +1 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../../api/hub.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA+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AC,EAAE,CAAC;QAAE,WAAW,CAAC,EAAE,CAAC,GAAC,CAAC,CAAA;IACtC,WAAW,CAAC,EAAE,CAAC,IAAE,CAAC,CAAA;IAClB,cAAc,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,GAAG,EAAE;QACnC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACzB,yCAAyC;QACzC,WAAW,CAAC,EAAE,CAAC,GAAC,CAAC,CAAA;IACnB,CAAC,EAAE,KAAK,CAAC,CAAA;AACX,CAAC"} \ No newline at end of file diff --git a/dist/api/utils/setup.js b/dist/api/utils/setup.js index c534d555d..6ed90223b 100644 --- a/dist/api/utils/setup.js +++ b/dist/api/utils/setup.js @@ -16,7 +16,7 @@ const QRCode = require("qrcode"); const publicIp = require("public-ip"); const password_1 = require("../utils/password"); const gitinfo_1 = require("../utils/gitinfo"); -const USER_VERSION = 4; +const USER_VERSION = 5; const setupDatabase = () => __awaiter(void 0, void 0, void 0, function* () { console.log('=> [db] starting setup...'); yield setVersion(); @@ -44,6 +44,12 @@ function setVersion() { } function migrate() { return __awaiter(this, void 0, void 0, function* () { + try { + yield models_1.sequelize.query(`CREATE INDEX idx_messages_sender ON sphinx_messages (sender);`); + } + catch (e) { + console.log(e); + } addTableColumn('sphinx_contacts', 'notification_sound'); try { yield models_1.sequelize.query(` diff --git a/dist/api/utils/setup.js.map b/dist/api/utils/setup.js.map index 119de2dc8..1184d36af 100644 --- a/dist/api/utils/setup.js.map +++ b/dist/api/utils/setup.js.map @@ -1 +1 @@ -{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../api/utils/setup.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2CAA2C;AAC3C,sCAA2C;AAC3C,iDAAoC;AACpC,iCAAgC;AAChC,sCAAqC;AACrC,gDAAwC;AACxC,8CAA0D;AAE1D,MAAM,YAAY,GAAG,CAAC,CAAA;AAEtB,MAAM,aAAa,GAAG,GAAS,EAAE;IAC/B,OAA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AC,GAAE;SACb;aAAM;YACL,SAAS,GAAG,EAAE,CAAA;SACf;QACD,IAAG,CAAC,SAAS,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;YACvC,OAAM;SACP;QACD,IAAI,KAAK,GAAG,SAAS,CAAA;QACrB,qDAAqD;QAErD,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,kBAAQ,IAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAC3E,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAA;QAC1C,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAChB,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAC,EAAC,IAAI,EAAC,UAAU,EAAC,EAAE,UAAU,GAAG,EAAE,GAAG;YACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAClB,CAAC,CAAC,CAAA;IACJ,CAAC;CAAA"} \ No newline at end of file From 02501c0a319b8ccaadcd57aa76af32dcf38940d1 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Tue, 21 Jul 2020 15:49:57 -0700 Subject: [PATCH 09/15] seen on Chat set to false when new msg, send empty notificaiton when see chat --- api/controllers/messages.ts | 6 ++++++ api/hub.ts | 30 +++++++++++++++++----------- api/models/ts/chat.ts | 7 +++++++ api/network/receive.ts | 1 + api/utils/setup.ts | 14 +++++++------ dist/api/controllers/messages.js | 5 +++++ dist/api/controllers/messages.js.map | 2 +- dist/api/hub.js | 22 +++++++++++--------- dist/api/hub.js.map | 2 +- dist/api/models/ts/chat.js | 8 ++++++++ dist/api/models/ts/chat.js.map | 2 +- dist/api/network/receive.js | 2 ++ dist/api/network/receive.js.map | 2 +- dist/api/utils/setup.js | 13 ++++++------ dist/api/utils/setup.js.map | 2 +- 15 files changed, 80 insertions(+), 38 deletions(-) diff --git a/api/controllers/messages.ts b/api/controllers/messages.ts index c388c80cb..54c61c889 100644 --- a/api/controllers/messages.ts +++ b/api/controllers/messages.ts @@ -282,8 +282,14 @@ export const readMessages = async (req, res) => { chatId: chat_id } }); + models.Chat.update({ seen: true }, { + where: {id:chat_id} + }); success(res, {}) + + const chat = await models.Chat.findOne({ where: { id: chat_id } }) + sendNotification(chat, '', 'badge') } export const clearMessages = (req, res) => { diff --git a/api/hub.ts b/api/hub.ts index 367caa76f..051fcb655 100644 --- a/api/hub.ts +++ b/api/hub.ts @@ -119,7 +119,7 @@ export function sendInvoice(payReq, amount) { headers: { 'Content-Type': 'application/json' } }) .catch(error => { - console.log('[hub error]', error) + console.log('[hub error]: sendInvoice', error) }) } @@ -188,7 +188,9 @@ const createInviteInHub = (params, onSuccess, onFailure) => { }) } -const sendNotification = async (chat, name, type) => { +type NotificationType = 'group' | 'badge' | 'invite' | 'message' + +const sendNotification = async (chat, name, type:NotificationType) => { let message = `You have a new message from ${name}` if(type==='invite'){ @@ -204,7 +206,7 @@ const sendNotification = async (chat, name, type) => { console.log('[send notification]', { chat_id:chat.id, message }) - if (chat.isMuted) { + if (chat.isMuted && type!=='badge') { console.log('[send notification] skipping. chat is muted.') return } @@ -215,18 +217,23 @@ const sendNotification = async (chat, name, type) => { console.log('[send notification] skipping. owner.deviceId not set.') return } - - const unseenMessages = await models.Message.count({ where: { sender: { [Op.ne]: owner.id }, seen: false } }) const device_id = owner.deviceId + let unseenMessages=0 + if(type!=='badge' && type!=='invite') { + unseenMessages = await models.Message.count({ where: { sender: { [Op.ne]: owner.id }, seen: false } }) + } + const params:{[k:string]:any} = {device_id} const notification:{[k:string]:any} = { chat_id: chat.id, - message, badge: unseenMessages } - if(owner.notificationSound) { - notification.sound = owner.notificationSound + if(type!=='badge') { + notification.message = message + if(owner.notificationSound) { + notification.sound = owner.notificationSound + } } params.notification = notification @@ -247,10 +254,9 @@ function triggerNotification(params){ body: JSON.stringify(params), headers: { 'Content-Type': 'application/json' } }) - .then(res => res.json()) - .then(json => { - // console.log('[hub notification]', json) - }) + .catch(error => { + console.log('[hub error]: triggerNotification', error) + }) } export { diff --git a/api/models/ts/chat.ts b/api/models/ts/chat.ts index 221c93a88..8334cb3fe 100644 --- a/api/models/ts/chat.ts +++ b/api/models/ts/chat.ts @@ -69,4 +69,11 @@ export default class Chat extends Model { @Column ownerPubkey: string + @Column({ + type: DataType.BOOLEAN, + defaultValue: false, + allowNull: false + }) + seen: boolean + } \ No newline at end of file diff --git a/api/network/receive.ts b/api/network/receive.ts index b7eb6b972..8c7e04498 100644 --- a/api/network/receive.ts +++ b/api/network/receive.ts @@ -43,6 +43,7 @@ async function onReceive(payload){ if(payload.chat) { isTribe = payload.chat.type===constants.chat_types.tribe chat = await models.Chat.findOne({where:{uuid:payload.chat.uuid}}) + if(chat) chat.update({seen:false}) } if(isTribe) { const tribeOwnerPubKey = chat && chat.ownerPubkey diff --git a/api/utils/setup.ts b/api/utils/setup.ts index 18f002de3..9cc3b86f1 100644 --- a/api/utils/setup.ts +++ b/api/utils/setup.ts @@ -31,6 +31,8 @@ async function setVersion(){ } async function migrate(){ + addTableColumn('sphinx_chats', 'seen', 'BOOLEAN') + try{ await sequelize.query(`CREATE INDEX idx_messages_sender ON sphinx_messages (sender);`) }catch(e){ @@ -55,14 +57,14 @@ CREATE TABLE sphinx_timers ( addTableColumn('sphinx_contacts', 'private_photo', 'BOOLEAN') - addTableColumn('sphinx_media_keys', 'media_type') - addTableColumn('sphinx_media_keys', 'original_muid') - addTableColumn('sphinx_messages', 'original_muid') + // addTableColumn('sphinx_media_keys', 'media_type') + // addTableColumn('sphinx_media_keys', 'original_muid') + // addTableColumn('sphinx_messages', 'original_muid') - addTableColumn('sphinx_messages', 'uuid') - addTableColumn('sphinx_messages', 'reply_uuid') + // addTableColumn('sphinx_messages', 'uuid') + // addTableColumn('sphinx_messages', 'reply_uuid') - addTableColumn('sphinx_media_keys', 'sender', 'BIGINT') + // addTableColumn('sphinx_media_keys', 'sender', 'BIGINT') } async function addTableColumn(table:string, column:string, type='TEXT') { diff --git a/dist/api/controllers/messages.js b/dist/api/controllers/messages.js index 73a2d8e24..b75ffa310 100644 --- a/dist/api/controllers/messages.js +++ b/dist/api/controllers/messages.js @@ -249,7 +249,12 @@ exports.readMessages = (req, res) => __awaiter(void 0, void 0, void 0, function* chatId: chat_id } }); + models_1.models.Chat.update({ seen: true }, { + where: { id: chat_id } + }); res_1.success(res, {}); + const chat = yield models_1.models.Chat.findOne({ where: { id: chat_id } }); + hub_1.sendNotification(chat, '', 'badge'); }); exports.clearMessages = (req, res) => { models_1.models.Message.destroy({ where: {}, truncate: true }); diff --git a/dist/api/controllers/messages.js.map b/dist/api/controllers/messages.js.map index 4457dc4f2..46b933eb7 100644 --- a/dist/api/controllers/messages.js.map +++ b/dist/api/controllers/messages.js.map @@ -1 +1 @@ -{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../api/controllers/messages.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,yCAA8B;AAC9B,2CAAoC;AACpC,gCAAyC;AACzC,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AACrC,sCAAsC;AACtC,0CAAyC;AACzC,mDAAgD;AAChD,6BAA4B;AAC5B,sCAAqC;AACrC,oCAAmC;AAEnC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAEhE,QAAA,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC7C,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;IAEpC,IAAI,CAAC,YAAY,EAAE;QAClB,OAAO,sBAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAC/B;IACD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IACzB,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAA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EnB,MAAM,OAAO,CAAC,MAAM,CAAC,EAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAC,CAAC,CAAA;IAC1D,MAAM,CAAC,QAAQ,CAAC;QACf,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC;KACxD,CAAC,CAAA;AACH,CAAC,CAAA,CAAA;AAEY,QAAA,YAAY,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC9C,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC;IAEnC,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAC,CAAC,CAAA;IAEvE,eAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QACrC,KAAK,EAAE;YACL,MAAM,EAAE;gBACT,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE;aACf;YACD,MAAM,EAAE,OAAO;SAChB;KACD,CAAC,CAAC;IAEH,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA,CAAA;AAEY,QAAA,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACzC,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAErD,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../api/controllers/messages.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,yCAA8B;AAC9B,2CAAoC;AACpC,gCAAyC;AACzC,0CAAyC;A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,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE;aACf;YACD,MAAM,EAAE,OAAO;SAChB;KACD,CAAC,CAAC;IACH,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAClC,KAAK,EAAE,EAAC,EAAE,EAAC,OAAO,EAAC;KACnB,CAAC,CAAC;IAEH,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;IAEhB,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,CAAA;IAClE,sBAAgB,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACpC,CAAC,CAAA,CAAA;AAEY,QAAA,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACzC,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAErD,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/api/hub.js b/dist/api/hub.js index 535d5aae4..0eff85165 100644 --- a/dist/api/hub.js +++ b/dist/api/hub.js @@ -114,7 +114,7 @@ function sendInvoice(payReq, amount) { headers: { 'Content-Type': 'application/json' } }) .catch(error => { - console.log('[hub error]', error); + console.log('[hub error]: sendInvoice', error); }); } exports.sendInvoice = sendInvoice; @@ -199,7 +199,7 @@ const sendNotification = (chat, name, type) => __awaiter(void 0, void 0, void 0, message += ` on ${chat.name}`; } console.log('[send notification]', { chat_id: chat.id, message }); - if (chat.isMuted) { + if (chat.isMuted && type !== 'badge') { console.log('[send notification] skipping. chat is muted.'); return; } @@ -208,16 +208,21 @@ const sendNotification = (chat, name, type) => __awaiter(void 0, void 0, void 0, console.log('[send notification] skipping. owner.deviceId not set.'); return; } - const unseenMessages = yield models_1.models.Message.count({ where: { sender: { [sequelize_1.Op.ne]: owner.id }, seen: false } }); const device_id = owner.deviceId; + let unseenMessages = 0; + if (type !== 'badge' && type !== 'invite') { + unseenMessages = yield models_1.models.Message.count({ where: { sender: { [sequelize_1.Op.ne]: owner.id }, seen: false } }); + } const params = { device_id }; const notification = { chat_id: chat.id, - message, badge: unseenMessages }; - if (owner.notificationSound) { - notification.sound = owner.notificationSound; + if (type !== 'badge') { + notification.message = message; + if (owner.notificationSound) { + notification.sound = owner.notificationSound; + } } params.notification = notification; if (type === 'message' && chat.type == constants.chat_types.tribe) { @@ -238,9 +243,8 @@ function triggerNotification(params) { body: JSON.stringify(params), headers: { 'Content-Type': 'application/json' } }) - .then(res => res.json()) - .then(json => { - // console.log('[hub notification]', json) + .catch(error => { + console.log('[hub error]: triggerNotification', error); }); } // let inDebounce diff --git a/dist/api/hub.js.map b/dist/api/hub.js.map index 4cc9754a3..4e12dbac0 100644 --- a/dist/api/hub.js.map +++ b/dist/api/hub.js.map @@ -1 +1 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../../api/hub.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA+B;AAC/B,oCAAmC;AACnC,yCAA8B;AAC9B,yCAAwC;AACxC,0CAAyC;AACzC,qCAAoC;AACpC,+CAAyC;AACzC,iDAAiD;AACjD,6BAA4B;AAE5B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,CAAC,CAAC,CAAA;AAC3E,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAEvE,MAAM,cAAc,GAAG,CAAO,MAAM,GAAG,EAAE,EAAE,EAAE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AAW,CAAC,EAAE,CAAC,GAAC,CAAC,CAAA;IACnB,CAAC,EAAE,KAAK,CAAC,CAAA;AACX,CAAC"} \ No newline at end of file diff --git a/dist/api/models/ts/chat.js b/dist/api/models/ts/chat.js index ce2f9eddb..d3a577876 100644 --- a/dist/api/models/ts/chat.js +++ b/dist/api/models/ts/chat.js @@ -97,6 +97,14 @@ __decorate([ sequelize_typescript_1.Column, __metadata("design:type", String) ], Chat.prototype, "ownerPubkey", void 0); +__decorate([ + sequelize_typescript_1.Column({ + type: sequelize_typescript_1.DataType.BOOLEAN, + defaultValue: false, + allowNull: false + }), + __metadata("design:type", Boolean) +], Chat.prototype, "seen", void 0); Chat = __decorate([ sequelize_typescript_1.Table({ tableName: 'sphinx_chats', underscored: true }) ], Chat); diff --git a/dist/api/models/ts/chat.js.map b/dist/api/models/ts/chat.js.map index 1ce3dd658..a05979351 100644 --- a/dist/api/models/ts/chat.js.map +++ b/dist/api/models/ts/chat.js.map @@ -1 +1 @@ -{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../../api/models/ts/chat.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAsE;AAGtE,IAAqB,IAAI,GAAzB,MAAqB,IAAK,SAAQ,4BAAW;CAoE5C,CAAA;AA5DC;IANC,6BAAM,CAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;QACZ,aAAa,EAAE,IAAI;KACpB,CAAC;;gCACQ;AAGV;IADC,6BAAM;;kCACK;AAGZ;IADC,6BAAM;;kCACK;AAGZ;IADC,6BAAM;;sCACS;AAGhB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;kCACZ;AAGZ;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;oCACV;AAGd;IADC,6BAAM;;wCACW;AAGlB;IADC,6BAAM;;qCACS;AAGhB;IADC,6BAAM;8BACI,IAAI;uCAAA;AAGf;IADC,6BAAM;8BACI,IAAI;uCAAA;AAOf;IALC,6BAAM,CAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,YAAY,EAAE,KAAK;QACnB,SAAS,EAAE,KAAK;KACjB,CAAC;;qCACc;AAGhB;IADC,6BAAM;;sCACS;AAGhB;IADC,6BAAM;;6CACgB;AAGvB;IADC,6BAAM;;kCACK;AAGZ;IADC,6BAAM;;yCACY;AAGnB;IADC,6BAAM;;6CACgB;AAGvB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;0CACJ;AAGpB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;0CACJ;AAGpB;IADC,6BAAM;;yCACY;AAlEA,IAAI;IADxB,4BAAK,CAAC,EAAC,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,EAAC,CAAC;GACjC,IAAI,CAoExB;kBApEoB,IAAI"} \ No newline at end of file +{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../../api/models/ts/chat.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAsE;AAGtE,IAAqB,IAAI,GAAzB,MAAqB,IAAK,SAAQ,4BAAW;CA2E5C,CAAA;AAnEC;IANC,6BAAM,CAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;QACZ,aAAa,EAAE,IAAI;KACpB,CAAC;;gCACQ;AAGV;IADC,6BAAM;;kCACK;AAGZ;IADC,6BAAM;;kCACK;AAGZ;IADC,6BAAM;;sCACS;AAGhB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;kCACZ;AAGZ;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;oCACV;AAGd;IADC,6BAAM;;wCACW;AAGlB;IADC,6BAAM;;qCACS;AAGhB;IADC,6BAAM;8BACI,IAAI;uCAAA;AAGf;IADC,6BAAM;8BACI,IAAI;uCAAA;AAOf;IALC,6BAAM,CAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,YAAY,EAAE,KAAK;QACnB,SAAS,EAAE,KAAK;KACjB,CAAC;;qCACc;AAGhB;IADC,6BAAM;;sCACS;AAGhB;IADC,6BAAM;;6CACgB;AAGvB;IADC,6BAAM;;kCACK;AAGZ;IADC,6BAAM;;yCACY;AAGnB;IADC,6BAAM;;6CACgB;AAGvB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;0CACJ;AAGpB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;0CACJ;AAGpB;IADC,6BAAM;;yCACY;AAOnB;IALC,6BAAM,CAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,YAAY,EAAE,KAAK;QACnB,SAAS,EAAE,KAAK;KACjB,CAAC;;kCACW;AAzEM,IAAI;IADxB,4BAAK,CAAC,EAAC,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,EAAC,CAAC;GACjC,IAAI,CA2ExB;kBA3EoB,IAAI"} \ No newline at end of file diff --git a/dist/api/network/receive.js b/dist/api/network/receive.js index efa7ab411..c2e86c7d3 100644 --- a/dist/api/network/receive.js +++ b/dist/api/network/receive.js @@ -52,6 +52,8 @@ function onReceive(payload) { if (payload.chat) { isTribe = payload.chat.type === constants.chat_types.tribe; chat = yield models_1.models.Chat.findOne({ where: { uuid: payload.chat.uuid } }); + if (chat) + chat.update({ seen: false }); } if (isTribe) { const tribeOwnerPubKey = chat && chat.ownerPubkey; diff --git a/dist/api/network/receive.js.map b/dist/api/network/receive.js.map index 62fc13631..6b4529950 100644 --- a/dist/api/network/receive.js.map +++ b/dist/api/network/receive.js.map @@ -1 +1 @@ -{"version":3,"file":"receive.js","sourceRoot":"","sources":["../../../api/network/receive.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAC5B,sCAAqC;AACrC,kDAA0C;AAC1C,gDAAsC;AACtC,0CAAyC;AACzC,kDA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AAC,CAAC,CAAC,EAAC,CAAC,EAAC,EAAE,CAAA,CAAC,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAA,EAAE;YAC7C,OAAO,IAAI,GAAG,CAAC,CAAC,CAAA;QACjB,CAAC,CAAC,CAAA;QACF,OAAO,MAAM,CAAC,EAAE,CAAC,CAAA;QACjB,OAAO,OAAO,CAAA;KACd;AACF,CAAC"} \ No newline at end of file diff --git a/dist/api/utils/setup.js b/dist/api/utils/setup.js index 6ed90223b..f17b232cf 100644 --- a/dist/api/utils/setup.js +++ b/dist/api/utils/setup.js @@ -44,6 +44,7 @@ function setVersion() { } function migrate() { return __awaiter(this, void 0, void 0, function* () { + addTableColumn('sphinx_chats', 'seen', 'BOOLEAN'); try { yield models_1.sequelize.query(`CREATE INDEX idx_messages_sender ON sphinx_messages (sender);`); } @@ -66,12 +67,12 @@ CREATE TABLE sphinx_timers ( addTableColumn('sphinx_chats', 'escrow_amount', 'BIGINT'); addTableColumn('sphinx_chats', 'escrow_millis', 'BIGINT'); addTableColumn('sphinx_contacts', 'private_photo', 'BOOLEAN'); - addTableColumn('sphinx_media_keys', 'media_type'); - addTableColumn('sphinx_media_keys', 'original_muid'); - addTableColumn('sphinx_messages', 'original_muid'); - addTableColumn('sphinx_messages', 'uuid'); - addTableColumn('sphinx_messages', 'reply_uuid'); - addTableColumn('sphinx_media_keys', 'sender', 'BIGINT'); + // addTableColumn('sphinx_media_keys', 'media_type') + // addTableColumn('sphinx_media_keys', 'original_muid') + // addTableColumn('sphinx_messages', 'original_muid') + // addTableColumn('sphinx_messages', 'uuid') + // addTableColumn('sphinx_messages', 'reply_uuid') + // addTableColumn('sphinx_media_keys', 'sender', 'BIGINT') }); } function addTableColumn(table, column, type = 'TEXT') { diff --git a/dist/api/utils/setup.js.map b/dist/api/utils/setup.js.map index 1184d36af..f1ef14caa 100644 --- a/dist/api/utils/setup.js.map +++ b/dist/api/utils/setup.js.map @@ -1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,CAAC,CAAA;IAChE,CAAC;CAAA;AAED,SAAe,OAAO;;QACpB,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAA;QAC9B,IAAI,SAAS,CAAA;QACb,IAAG,CAAC,EAAE,EAAE;YACN,IAAI;gBACF,SAAS,GAAG,MAAM,QAAQ,CAAC,EAAE,EAAE,CAAA;aAChC;YAAC,OAAM,CAAC,EAAC,GAAE;SACb;aAAM;YACL,SAAS,GAAG,EAAE,CAAA;SACf;QACD,IAAG,CAAC,SAAS,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;YACvC,OAAM;SACP;QACD,IAAI,KAAK,GAAG,SAAS,CAAA;QACrB,qDAAqD;QAErD,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,kBAAQ,IAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAC3E,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAA;QAC1C,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAChB,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAC,EAAC,IAAI,EAAC,UAAU,EAAC,EAAE,UAAU,GAAG,EAAE,GAAG;YACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAClB,CAAC,CAAC,CAAA;IACJ,CAAC;CAAA"} \ No newline at end of file From 47b3c6ee0b8f271395c384a2d85c2ebc3c0c3086 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Wed, 22 Jul 2020 09:54:56 -0700 Subject: [PATCH 10/15] changes for push --- api/controllers/messages.ts | 12 +++++++----- api/hub.ts | 7 +------ dist/api/controllers/messages.js | 12 +++++++----- dist/api/controllers/messages.js.map | 2 +- dist/api/hub.js | 6 +----- dist/api/hub.js.map | 2 +- 6 files changed, 18 insertions(+), 23 deletions(-) diff --git a/api/controllers/messages.ts b/api/controllers/messages.ts index 54c61c889..e0f97cb4a 100644 --- a/api/controllers/messages.ts +++ b/api/controllers/messages.ts @@ -274,7 +274,7 @@ export const readMessages = async (req, res) => { const owner = await models.Contact.findOne({ where: { isOwner: true }}) - models.Message.update({ seen: true }, { + await models.Message.update({ seen: true }, { where: { sender: { [Op.ne]: owner.id @@ -282,14 +282,16 @@ export const readMessages = async (req, res) => { chatId: chat_id } }); - models.Chat.update({ seen: true }, { - where: {id:chat_id} - }); + const chat = await models.Chat.findOne({ where: { id: chat_id } }) + chat.update({ seen: true }); success(res, {}) - const chat = await models.Chat.findOne({ where: { id: chat_id } }) sendNotification(chat, '', 'badge') + socket.sendJson({ + type: 'chat_seen', + response: jsonUtils.chatToJson(chat) + }) } export const clearMessages = (req, res) => { diff --git a/api/hub.ts b/api/hub.ts index 051fcb655..f185a279d 100644 --- a/api/hub.ts +++ b/api/hub.ts @@ -206,11 +206,6 @@ const sendNotification = async (chat, name, type:NotificationType) => { console.log('[send notification]', { chat_id:chat.id, message }) - if (chat.isMuted && type!=='badge') { - console.log('[send notification] skipping. chat is muted.') - return - } - const owner = await models.Contact.findOne({ where: { isOwner: true }}) if (!owner.deviceId) { @@ -220,7 +215,7 @@ const sendNotification = async (chat, name, type:NotificationType) => { const device_id = owner.deviceId let unseenMessages=0 - if(type!=='badge' && type!=='invite') { + if(!chat.isMuted || type!=='invite') { unseenMessages = await models.Message.count({ where: { sender: { [Op.ne]: owner.id }, seen: false } }) } diff --git a/dist/api/controllers/messages.js b/dist/api/controllers/messages.js index b75ffa310..bbf9de064 100644 --- a/dist/api/controllers/messages.js +++ b/dist/api/controllers/messages.js @@ -241,7 +241,7 @@ exports.receiveDeleteMessage = (payload) => __awaiter(void 0, void 0, void 0, fu exports.readMessages = (req, res) => __awaiter(void 0, void 0, void 0, function* () { const chat_id = req.params.chat_id; const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); - models_1.models.Message.update({ seen: true }, { + yield models_1.models.Message.update({ seen: true }, { where: { sender: { [sequelize_1.Op.ne]: owner.id @@ -249,12 +249,14 @@ exports.readMessages = (req, res) => __awaiter(void 0, void 0, void 0, function* chatId: chat_id } }); - models_1.models.Chat.update({ seen: true }, { - where: { id: chat_id } - }); - res_1.success(res, {}); const chat = yield models_1.models.Chat.findOne({ where: { id: chat_id } }); + chat.update({ seen: true }); + res_1.success(res, {}); hub_1.sendNotification(chat, '', 'badge'); + socket.sendJson({ + type: 'chat_seen', + response: jsonUtils.chatToJson(chat) + }); }); exports.clearMessages = (req, res) => { models_1.models.Message.destroy({ where: {}, truncate: true }); diff --git a/dist/api/controllers/messages.js.map b/dist/api/controllers/messages.js.map index 46b933eb7..2bb551554 100644 --- a/dist/api/controllers/messages.js.map +++ b/dist/api/controllers/messages.js.map @@ -1 +1 @@ -{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../api/controllers/messages.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,yCAA8B;AAC9B,2CAAoC;AACpC,gCAAyC;AACzC,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AACrC,sCAAsC;AACtC,0CAAyC;AACzC,mDAAgD;AAChD,6BAA4B;AAC5B,sCAAqC;AACrC,oCAAmC;AAEnC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAEhE,QAAA,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC7C,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;IAEpC,IAAI,CAAC,YAAY,EAAE;QAClB,OAAO,sBAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAC/B;IACD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IACzB,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CA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AAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAErD,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../api/controllers/messages.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,yCAA8B;AAC9B,2CAAoC;AACpC,gCAAyC;AACzC,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AACrC,sCAAsC;AACtC,0CAAyC;AACzC,mDAAgD;AAChD,6BAA4B;AAC5B,sCAAqC;AACrC,oCAAmC;AAEnC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAEhE,QAAA,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC7C,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;IAEpC,IAAI,CAAC,YAAY,EAAE;QAClB,OAAO,sBAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAC/B;IACD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IACzB,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;IACxE,mCAAmC;IAEnC,IAAI,gBAAgB,GAAG;QACtB,IAAI,EAAE,EAAE,CAAC,cAAE,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE;QAChC,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE;YACR,EAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAC;YACpB,EAAC,QAAQ,EAAE,IAAI,EAAC;SAChB;KACD,CAAA;IAED,IAAI,sBAAsB,GAAG;QAC5B,UAAU,EAAE,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-199,10 +199,6 @@ const sendNotification = (chat, name, type) => __awaiter(void 0, void 0, void 0, message += ` on ${chat.name}`; } console.log('[send notification]', { chat_id: chat.id, message }); - if (chat.isMuted && type !== 'badge') { - console.log('[send notification] skipping. chat is muted.'); - return; - } const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); if (!owner.deviceId) { console.log('[send notification] skipping. owner.deviceId not set.'); @@ -210,7 +206,7 @@ const sendNotification = (chat, name, type) => __awaiter(void 0, void 0, void 0, } const device_id = owner.deviceId; let unseenMessages = 0; - if (type !== 'badge' && type !== 'invite') { + if (!chat.isMuted || type !== 'invite') { unseenMessages = yield models_1.models.Message.count({ where: { sender: { [sequelize_1.Op.ne]: owner.id }, seen: false } }); } const params = { device_id }; diff --git a/dist/api/hub.js.map b/dist/api/hub.js.map index 4e12dbac0..5fe0a36e5 100644 --- a/dist/api/hub.js.map +++ b/dist/api/hub.js.map @@ -1 +1 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../../api/hub.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA+B;AAC/B,oCAAmC;AACnC,yCAA8B;AAC9B,yCAAwC;AACxC,0CAAyC;AACzC,qCAAoC;AACpC,+CAAyC;AACzC,iDAAiD;AACjD,6BAA4B;AAE5B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,CAAC,CAAC,CAAA;AAC3E,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAEvE,MAAM,cAAc,GAAG,CAAO,MAAM,GAAG,EAAE,EAAE,EAAE;IAC3C,IAAI,GAAG,IAAI,YAAY,EAAE;QACvB,OAAM;KACP;IACD,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,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AC,EAAE,KAAK,CAAC,CAAA;AACX,CAAC"} \ No newline at end of file From b8213369c695a1d5067beb1231a05ab1e7dbaae1 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Wed, 22 Jul 2020 10:00:15 -0700 Subject: [PATCH 11/15] fix if is muted --- api/hub.ts | 7 ++----- dist/api/hub.js | 7 ++----- dist/api/hub.js.map | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/api/hub.ts b/api/hub.ts index f185a279d..0512ad1e9 100644 --- a/api/hub.ts +++ b/api/hub.ts @@ -214,17 +214,14 @@ const sendNotification = async (chat, name, type:NotificationType) => { } const device_id = owner.deviceId - let unseenMessages=0 - if(!chat.isMuted || type!=='invite') { - unseenMessages = await models.Message.count({ where: { sender: { [Op.ne]: owner.id }, seen: false } }) - } + let unseenMessages=await models.Message.count({ where: { sender: { [Op.ne]: owner.id }, seen: false } }) const params:{[k:string]:any} = {device_id} const notification:{[k:string]:any} = { chat_id: chat.id, badge: unseenMessages } - if(type!=='badge') { + if(type!=='badge' && !chat.isMuted) { notification.message = message if(owner.notificationSound) { notification.sound = owner.notificationSound diff --git a/dist/api/hub.js b/dist/api/hub.js index 9026d402b..b31496fcc 100644 --- a/dist/api/hub.js +++ b/dist/api/hub.js @@ -205,16 +205,13 @@ const sendNotification = (chat, name, type) => __awaiter(void 0, void 0, void 0, return; } const device_id = owner.deviceId; - let unseenMessages = 0; - if (!chat.isMuted || type !== 'invite') { - unseenMessages = yield models_1.models.Message.count({ where: { sender: { [sequelize_1.Op.ne]: owner.id }, seen: false } }); - } + let unseenMessages = yield models_1.models.Message.count({ where: { sender: { [sequelize_1.Op.ne]: owner.id }, seen: false } }); const params = { device_id }; const notification = { chat_id: chat.id, badge: unseenMessages }; - if (type !== 'badge') { + if (type !== 'badge' && !chat.isMuted) { notification.message = message; if (owner.notificationSound) { notification.sound = owner.notificationSound; diff --git a/dist/api/hub.js.map b/dist/api/hub.js.map index 5fe0a36e5..66af48d06 100644 --- a/d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E,KAAK;IAC/B,MAAM,OAAO,GAAG,IAAI,CAAA;IACpB,MAAM,IAAI,GAAG,SAAS,CAAA;IACtB,IAAG,cAAc,CAAC,EAAE,CAAC;QAAE,YAAY,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;IACvD,IAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QAAE,WAAW,CAAC,EAAE,CAAC,GAAC,CAAC,CAAA;IACtC,WAAW,CAAC,EAAE,CAAC,IAAE,CAAC,CAAA;IAClB,cAAc,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,GAAG,EAAE;QACnC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACzB,yCAAyC;QACzC,WAAW,CAAC,EAAE,CAAC,GAAC,CAAC,CAAA;IACnB,CAAC,EAAE,KAAK,CAAC,CAAA;AACX,CAAC"} \ No newline at end of file From 3564f4e437166e96de064fb317b54f1e135b573a Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Wed, 22 Jul 2020 10:03:12 -0700 Subject: [PATCH 12/15] fix --- api/controllers/messages.ts | 2 +- dist/api/controllers/messages.js | 2 +- dist/api/controllers/messages.js.map | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/controllers/messages.ts b/api/controllers/messages.ts index e0f97cb4a..3112dc59b 100644 --- a/api/controllers/messages.ts +++ b/api/controllers/messages.ts @@ -283,7 +283,7 @@ export const readMessages = async (req, res) => { } }); const chat = await models.Chat.findOne({ where: { id: chat_id } }) - chat.update({ seen: true }); + await chat.update({ seen: true }); success(res, {}) diff --git a/dist/api/controllers/messages.js b/dist/api/controllers/messages.js index bbf9de064..16bddfa3d 100644 --- a/dist/api/controllers/messages.js +++ b/dist/api/controllers/messages.js @@ -250,7 +250,7 @@ exports.readMessages = (req, res) => __awaiter(void 0, void 0, void 0, function* } }); const chat = yield models_1.models.Chat.findOne({ where: { id: chat_id } }); - chat.update({ seen: true }); + yield chat.update({ seen: true }); res_1.success(res, {}); hub_1.sendNotification(chat, '', 'badge'); socket.sendJson({ diff --git a/dist/api/controllers/messages.js.map b/dist/api/controllers/messages.js.map index 2bb551554..bd71fe615 100644 --- a/dist/api/controllers/messages.js.map +++ b/dist/api/controllers/messages.js.map @@ -1 +1 @@ -{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../api/controllers/messages.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,yCAA8B;AAC9B,2CAAoC;AACpC,gCAAyC;AACzC,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AACrC,sCAAsC;AACtC,0CAAyC;AACzC,mDAAgD;AAChD,6BAA4B;AAC5B,sCAAqC;AACrC,oCAAmC;AAEnC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAEhE,QAAA,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC7C,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;IAEpC,IAAI,CAAC,YAAY,EAAE;QAClB,OAAO,sBAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAC/B;IACD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IACzB,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;IACxE,mCAAmC;IAEnC,IAAI,gBAAgB,GAAG;QACtB,IAAI,EAAE,EAAE,CAAC,cAAE,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE;QAChC,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE;YACR,EAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAC;YACpB,EAAC,QAAQ,EAAE,IAAI,EAAC;SAChB;KACD,CAAA;IAED,IAAI,sBAAsB,GAAG;QAC5B,UA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EAAE,EAAE;IAC9C,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC;IAEnC,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAC,CAAC,CAAA;IAEvE,MAAM,eAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAC3C,KAAK,EAAE;YACL,MAAM,EAAE;gBACT,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE;aACf;YACD,MAAM,EAAE,OAAO;SAChB;KACD,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,CAAA;IAClE,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAE5B,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;IAEhB,sBAAgB,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;IACnC,MAAM,CAAC,QAAQ,CAAC;QACf,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC;KACpC,CAAC,CAAA;AACH,CAAC,CAAA,CAAA;AAEY,QAAA,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACzC,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAErD,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../api/controllers/messages.ts"],"names":[],"mappings":";;;;;;;;;;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CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAC3C,KAAK,EAAE;YACL,MAAM,EAAE;gBACT,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE;aACf;YACD,MAAM,EAAE,OAAO;SAChB;KACD,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,CAAA;IAClE,MAAM,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAElC,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;IAEhB,sBAAgB,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;IACnC,MAAM,CAAC,QAAQ,CAAC;QACf,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC;KACpC,CAAC,CAAA;AACH,CAAC,CAAA,CAAA;AAEY,QAAA,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACzC,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAErD,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA"} \ No newline at end of file From a7732f4583e81c308cfad3b6dc2df59c6b3c2c02 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Wed, 22 Jul 2020 10:18:45 -0700 Subject: [PATCH 13/15] notify: check android, fix sound logic --- api/hub.ts | 11 +++++++---- dist/api/hub.js | 13 +++++++++---- dist/api/hub.js.map | 2 +- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/api/hub.ts b/api/hub.ts index 0512ad1e9..0451be6a9 100644 --- a/api/hub.ts +++ b/api/hub.ts @@ -213,19 +213,22 @@ const sendNotification = async (chat, name, type:NotificationType) => { return } const device_id = owner.deviceId + const isIOS = device_id.length===64 + const isAndroid = !isIOS let unseenMessages=await models.Message.count({ where: { sender: { [Op.ne]: owner.id }, seen: false } }) const params:{[k:string]:any} = {device_id} const notification:{[k:string]:any} = { chat_id: chat.id, - badge: unseenMessages + badge: unseenMessages, + sound: '' } if(type!=='badge' && !chat.isMuted) { notification.message = message - if(owner.notificationSound) { - notification.sound = owner.notificationSound - } + notification.sound = owner.notificationSound || 'default' + } else { + if(isAndroid) return // skip on Android if no actual message } params.notification = notification diff --git a/dist/api/hub.js b/dist/api/hub.js index b31496fcc..7ee2b7d8d 100644 --- a/dist/api/hub.js +++ b/dist/api/hub.js @@ -205,17 +205,22 @@ const sendNotification = (chat, name, type) => __awaiter(void 0, void 0, void 0, return; } const device_id = owner.deviceId; + const isIOS = device_id.length === 64; + const isAndroid = !isIOS; let unseenMessages = yield models_1.models.Message.count({ where: { sender: { [sequelize_1.Op.ne]: owner.id }, seen: false } }); const params = { device_id }; const notification = { chat_id: chat.id, - badge: unseenMessages + badge: unseenMessages, + sound: '' }; if (type !== 'badge' && !chat.isMuted) { notification.message = message; - if (owner.notificationSound) { - notification.sound = owner.notificationSound; - } + notification.sound = owner.notificationSound || 'default'; + } + else { + if (isAndroid) + return; // skip on Android if no actual message } params.notification = notification; if (type === 'message' && chat.type == constants.chat_types.tribe) { diff --git a/dist/api/hub.js.map b/dist/api/hub.js.map index 66af48d06..eabcc04c7 100644 --- a/dist/api/hub.js.map +++ b/dist/api/hub.js.map @@ -1 +1 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../../api/hub.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA+B;AAC/B,oCAAmC;AACnC,yCAA8B;AAC9B,yCAAwC;AACxC,0CAAyC;AACzC,qCAAoC;AACpC,+CAAyC;AACzC,iDAAiD;AACjD,6BAA4B;AAE5B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,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,CAAC,EAAE,CAAC,GAAC,CAAC,CAAA;IACtC,WAAW,CAAC,EAAE,CAAC,IAAE,CAAC,CAAA;IAClB,cAAc,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,GAAG,EAAE;QACnC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACzB,yCAAyC;QACzC,WAAW,CAAC,EAAE,CAAC,GAAC,CAAC,CAAA;IACnB,CAAC,EAAE,KAAK,CAAC,CAAA;AACX,CAAC"} \ No newline at end of file From f7d7e5329231552f8fa051be343bcb4d0b47e1b5 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Thu, 23 Jul 2020 12:54:41 -0700 Subject: [PATCH 14/15] fix badge count --- api/helpers.ts | 1 - api/hub.ts | 20 ++++++++++++-------- dist/api/helpers.js | 1 - dist/api/helpers.js.map | 2 +- dist/api/hub.js | 17 ++++++++++++----- dist/api/hub.js.map | 2 +- 6 files changed, 26 insertions(+), 17 deletions(-) diff --git a/api/helpers.ts b/api/helpers.ts index d0fdf7d22..ce60ab4fd 100644 --- a/api/helpers.ts +++ b/api/helpers.ts @@ -163,7 +163,6 @@ export async function parseReceiveParams(payload) { const owner = await models.Contact.findOne({ where: { isOwner: true } }) if (isConversation) { sender = await findOrCreateContactByPubkey(sender_pub_key) - console.log("CREATED CONTACT AUTOMATICALLY",sender&&sender.id) chat = await findOrCreateChatByUUID( chat_uuid, [parseInt(owner.id), parseInt(sender.id)] ) diff --git a/api/hub.ts b/api/hub.ts index 0451be6a9..500b663e6 100644 --- a/api/hub.ts +++ b/api/hub.ts @@ -204,8 +204,6 @@ const sendNotification = async (chat, name, type:NotificationType) => { message += ` on ${chat.name}` } - console.log('[send notification]', { chat_id:chat.id, message }) - const owner = await models.Contact.findOne({ where: { isOwner: true }}) if (!owner.deviceId) { @@ -215,13 +213,10 @@ const sendNotification = async (chat, name, type:NotificationType) => { const device_id = owner.deviceId const isIOS = device_id.length===64 const isAndroid = !isIOS - - let unseenMessages=await models.Message.count({ where: { sender: { [Op.ne]: owner.id }, seen: false } }) const params:{[k:string]:any} = {device_id} const notification:{[k:string]:any} = { chat_id: chat.id, - badge: unseenMessages, sound: '' } if(type!=='badge' && !chat.isMuted) { @@ -236,14 +231,23 @@ const sendNotification = async (chat, name, type:NotificationType) => { debounce(()=>{ const count = tribeCounts[chat.id]?tribeCounts[chat.id]+' ':'' params.notification.message = `You have ${count}new messages in ${chat.name}` - triggerNotification(params) + finalNotification(owner.id, params) }, chat.id, 30000) } else { - triggerNotification(params) + finalNotification(owner.id, params) + } +} + +async function finalNotification(ownerID: number, params:{[k:string]:any}){ + if(params.notification.message) { + console.log('[send notification]', params.notification) } + let unseenMessages = await models.Message.count({ where: { sender: { [Op.ne]: ownerID }, seen: false } }) + params.notification.badge = unseenMessages + triggerNotification(params) } -function triggerNotification(params){ +function triggerNotification(params:{[k:string]:any}){ fetch("https://hub.sphinx.chat/api/v1/nodes/notify", { method: 'POST' , body: JSON.stringify(params), diff --git a/dist/api/helpers.js b/dist/api/helpers.js index 564f9812d..24771dbf9 100644 --- a/dist/api/helpers.js +++ b/dist/api/helpers.js @@ -175,7 +175,6 @@ function parseReceiveParams(payload) { const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); if (isConversation) { sender = yield findOrCreateContactByPubkey(sender_pub_key); - console.log("CREATED CONTACT AUTOMATICALLY", sender && sender.id); chat = yield findOrCreateChatByUUID(chat_uuid, [parseInt(owner.id), parseInt(sender.id)]); if (sender.fromGroup) { // if a private msg received, update the contact yield sender.update({ fromGroup: false }); diff --git a/dist/api/helpers.js.map b/dist/api/helpers.js.map index 3b1eaaaec..952abd136 100644 --- a/dist/api/helpers.js.map +++ b/dist/api/helpers.js.map @@ -1 +1 @@ -{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../api/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAAiC;AACjC,2BAA0B;AAC1B,qCAAoC;AAEpC,MAAM,SAAS,GAAG,OAA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zE,OAAO;QACN,IAAI,EAAE,IAAI;QACV,MAAM,gCACL,OAAO,EAAE,MAAM,CAAC,SAAS,EACzB,WAAW,EAAE,MAAM,CAAC,UAAU,IAC3B,MAAM,CAAC,KAAK,IAAI,EAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAC,GACrC,eAAe,IAAI,EAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAC,CAClD;KACD,CAAA;AACF,CAAC"} \ No newline at end of file diff --git a/dist/api/hub.js b/dist/api/hub.js index 7ee2b7d8d..9a7f32dc8 100644 --- a/dist/api/hub.js +++ b/dist/api/hub.js @@ -198,7 +198,6 @@ const sendNotification = (chat, name, type) => __awaiter(void 0, void 0, void 0, if (type === 'message' && chat.type == constants.chat_types.group && chat.name && chat.name.length) { message += ` on ${chat.name}`; } - console.log('[send notification]', { chat_id: chat.id, message }); const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); if (!owner.deviceId) { console.log('[send notification] skipping. owner.deviceId not set.'); @@ -207,11 +206,9 @@ const sendNotification = (chat, name, type) => __awaiter(void 0, void 0, void 0, const device_id = owner.deviceId; const isIOS = device_id.length === 64; const isAndroid = !isIOS; - let unseenMessages = yield models_1.models.Message.count({ where: { sender: { [sequelize_1.Op.ne]: owner.id }, seen: false } }); const params = { device_id }; const notification = { chat_id: chat.id, - badge: unseenMessages, sound: '' }; if (type !== 'badge' && !chat.isMuted) { @@ -227,14 +224,24 @@ const sendNotification = (chat, name, type) => __awaiter(void 0, void 0, void 0, debounce(() => { const count = tribeCounts[chat.id] ? tribeCounts[chat.id] + ' ' : ''; params.notification.message = `You have ${count}new messages in ${chat.name}`; - triggerNotification(params); + finalNotification(owner.id, params); }, chat.id, 30000); } else { - triggerNotification(params); + finalNotification(owner.id, params); } }); exports.sendNotification = sendNotification; +function finalNotification(ownerID, params) { + return __awaiter(this, void 0, void 0, function* () { + if (params.notification.message) { + console.log('[send notification]', params.notification); + } + let unseenMessages = yield models_1.models.Message.count({ where: { sender: { [sequelize_1.Op.ne]: ownerID }, seen: false } }); + params.notification.badge = unseenMessages; + triggerNotification(params); + }); +} function triggerNotification(params) { fetch("https://hub.sphinx.chat/api/v1/nodes/notify", { method: 'POST', diff --git a/dist/api/hub.js.map b/dist/api/hub.js.map index eabcc04c7..4a89e2126 100644 --- a/dist/api/hub.js.map +++ b/dist/api/hub.js.map @@ -1 +1 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../../api/hub.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA+B;AAC/B,oCAAmC;AACnC,yCAA8B;AAC9B,yCAAwC;AACxC,0CAAyC;AACzC,qCAAoC;AACpC,+CAAyC;AACzC,iDAAiD;AACjD,6BAA4B;AAE5B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,CAAC,CAAC,CAAA;AAC3E,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAEvE,MAAM,cAAc,GAAG,CAAO,MAAM,GAAG,EAAE,EAAE,EAAE;IAC3C,IAAI,GAAG,IAAI,YAAY,EAAE;QACvB,OAAM;KACP;IACD,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAC,CAAC,CAAA;IAEvE,4CAA4C;IAE5C,MAAM,aAAa,GAAG,MAAM,eAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,cAAE,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,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Date: Thu, 23 Jul 2020 13:25:24 -0700 Subject: [PATCH 15/15] fix tribe caht mute --- api/hub.ts | 2 +- dist/api/hub.js | 2 +- dist/api/hub.js.map | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/hub.ts b/api/hub.ts index 500b663e6..d411804a4 100644 --- a/api/hub.ts +++ b/api/hub.ts @@ -230,7 +230,7 @@ const sendNotification = async (chat, name, type:NotificationType) => { if(type==='message' && chat.type==constants.chat_types.tribe){ debounce(()=>{ const count = tribeCounts[chat.id]?tribeCounts[chat.id]+' ':'' - params.notification.message = `You have ${count}new messages in ${chat.name}` + params.notification.message = chat.isMuted ? '' : `You have ${count}new messages in ${chat.name}` finalNotification(owner.id, params) }, chat.id, 30000) } else { diff --git a/dist/api/hub.js b/dist/api/hub.js index 9a7f32dc8..485c01588 100644 --- a/dist/api/hub.js +++ b/dist/api/hub.js @@ -223,7 +223,7 @@ const sendNotification = (chat, name, type) => __awaiter(void 0, void 0, void 0, if (type === 'message' && chat.type == constants.chat_types.tribe) { debounce(() => { const count = tribeCounts[chat.id] ? tribeCounts[chat.id] + ' ' : ''; - params.notification.message = `You have ${count}new messages in ${chat.name}`; + params.notification.message = chat.isMuted ? '' : `You have ${count}new messages in ${chat.name}`; finalNotification(owner.id, params); }, chat.id, 30000); } diff --git a/dist/api/hub.js.map b/dist/api/hub.js.map index 4a89e2126..61a99272c 100644 --- a/dist/api/hub.js.map +++ b/dist/api/hub.js.map @@ -1 +1 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../../api/hub.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA+B;AAC/B,oCAAmC;AACnC,yCAA8B;AAC9B,yCAAwC;AACxC,0CAAyC;AACzC,qCAAoC;AACpC,+CAAyC;AACzC,iDAAiD;AACjD,6BAA4B;AAE5B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,CAAC,CAAC,CAAA;AAC3E,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