Browse Source

upsert log

push-params
Evan Feenstra 4 years ago
parent
commit
59e7c0fcfd
  1. 7
      api/controllers/chatTribes.ts
  2. 7
      dist/api/controllers/chatTribes.js
  3. 2
      dist/api/controllers/chatTribes.js.map

7
api/controllers/chatTribes.ts

@ -150,6 +150,13 @@ export async function receiveMemberRequest(payload) {
}
if(!theSender) return console.log('no sender') // fail (no contact key?)
console.log("UPSERT",{
contactId: theSender.id,
chatId: chat.id,
role: constants.chat_roles.reader,
status: constants.chat_statuses.pending,
lastActive: date,
})
// maybe check here manually????
await models.ChatMember.upsert({
contactId: theSender.id,

7
dist/api/controllers/chatTribes.js

@ -151,6 +151,13 @@ function receiveMemberRequest(payload) {
}
if (!theSender)
return console.log('no sender'); // fail (no contact key?)
console.log("UPSERT", {
contactId: theSender.id,
chatId: chat.id,
role: constants.chat_roles.reader,
status: constants.chat_statuses.pending,
lastActive: date,
});
// maybe check here manually????
yield models_1.models.ChatMember.upsert({
contactId: theSender.id,

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

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