Browse Source

fix

push-params
Evan Feenstra 5 years ago
parent
commit
6f86774c6a
  1. 5
      api/controllers/chatTribes.ts
  2. 5
      dist/api/controllers/chatTribes.js
  3. 2
      dist/api/controllers/chatTribes.js.map

5
api/controllers/chatTribes.ts

@ -282,9 +282,10 @@ export async function approveOrRejectMember(req,res) {
await models.Message.create(msg)
const owner = await models.Contact.findOne({ where: { isOwner: true } })
console.log("SEND THIS MSG", { ...chat, contactIds: [member.contactId] })
const chatToSend = chat.dataValues||chat
console.log("SEND THIS MSG", { ...chatToSend, contactIds: [member.contactId] })
network.sendMessage({ // send to the requester
chat: { ...chat, contactIds: [member.contactId], },
chat: { ...chatToSend, contactIds: [member.contactId], },
amount: 0,
sender: owner,
message: {},

5
dist/api/controllers/chatTribes.js

@ -271,9 +271,10 @@ function approveOrRejectMember(req, res) {
};
yield models_1.models.Message.create(msg);
const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } });
console.log("SEND THIS MSG", Object.assign(Object.assign({}, chat), { contactIds: [member.contactId] }));
const chatToSend = chat.dataValues || chat;
console.log("SEND THIS MSG", Object.assign(Object.assign({}, chatToSend), { contactIds: [member.contactId] }));
network.sendMessage({
chat: Object.assign(Object.assign({}, chat), { contactIds: [member.contactId] }),
chat: Object.assign(Object.assign({}, chatToSend), { contactIds: [member.contactId] }),
amount: 0,
sender: owner,
message: {},

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

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