Browse Source

replay msgs only

feature/dockerfile-arm
Evan Feenstra 5 years ago
parent
commit
f26e675988
  1. 1
      api/controllers/chatTribes.ts
  2. 2
      dist/api/controllers/chatTribes.js
  3. 2
      dist/api/controllers/chatTribes.js.map

1
api/controllers/chatTribes.ts

@ -156,6 +156,7 @@ async function replayChatHistory(chat, contact) {
})
const owner = await models.Contact.findOne({ where: { isOwner: true } })
asyncForEach(msgs, async m=>{
if(m.type!==constants.message_types.message) return // only for message for now
const sender = {
...owner.dataValues,
...m.senderAlias && {alias: m.senderAlias},

2
dist/api/controllers/chatTribes.js

@ -154,6 +154,8 @@ function replayChatHistory(chat, contact) {
});
const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } });
asyncForEach(msgs, (m) => __awaiter(this, void 0, void 0, function* () {
if (m.type !== constants.message_types.message)
return; // only for message for now
const sender = Object.assign(Object.assign({}, owner.dataValues), m.senderAlias && { alias: m.senderAlias });
let content = '';
try {

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

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