Browse Source

test

feature/dockerfile-arm
Evan Feenstra 5 years ago
parent
commit
0c0512aa9f
  1. 1
      api/controllers/chatTribes.ts
  2. 6
      api/controllers/index.ts
  3. 1
      dist/api/controllers/chatTribes.js
  4. 2
      dist/api/controllers/chatTribes.js.map
  5. 5
      dist/api/controllers/index.js
  6. 2
      dist/api/controllers/index.js.map

1
api/controllers/chatTribes.ts

@ -147,6 +147,7 @@ async function editTribe(req, res) {
}
async function replayChatHistory(chat, contact) {
console.log('=> test replay')
const msgs = await models.Message.findAll({ order: [['id', 'asc']], limit:40 })
const owner = await models.Contact.findOne({ where: { isOwner: true } })
asyncForEach(msgs, async m=>{

6
api/controllers/index.ts

@ -21,9 +21,9 @@ const constants = require(path.join(__dirname,'../../config/constants.json'))
async function set(app) {
const chat = await models.Chat.findOne({where:{id:31}})
const contact = await models.Chat.findOne({where:{id:21}})
chatTribes.replayChatHistory(chat,contact)
const contact = await models.Contact.findOne({where:{id:21}})
if(chat&&contact) chatTribes.replayChatHistory(chat,contact)
if(models && models.Subscription){
subcriptions.initializeCronJobs()
}

1
dist/api/controllers/chatTribes.js

@ -144,6 +144,7 @@ function editTribe(req, res) {
exports.editTribe = editTribe;
function replayChatHistory(chat, contact) {
return __awaiter(this, void 0, void 0, function* () {
console.log('=> test replay');
const msgs = yield models_1.models.Message.findAll({ order: [['id', 'asc']], limit: 40 });
const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } });
asyncForEach(msgs, (m) => __awaiter(this, void 0, void 0, function* () {

2
dist/api/controllers/chatTribes.js.map

File diff suppressed because one or more lines are too long

5
dist/api/controllers/index.js

@ -30,8 +30,9 @@ const constants = require(path.join(__dirname, '../../config/constants.json'));
function set(app) {
return __awaiter(this, void 0, void 0, function* () {
const chat = yield models_1.models.Chat.findOne({ where: { id: 31 } });
const contact = yield models_1.models.Chat.findOne({ where: { id: 21 } });
chatTribes.replayChatHistory(chat, contact);
const contact = yield models_1.models.Contact.findOne({ where: { id: 21 } });
if (chat && contact)
chatTribes.replayChatHistory(chat, contact);
if (models_1.models && models_1.models.Subscription) {
subcriptions.initializeCronJobs();
}

2
dist/api/controllers/index.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save