Browse Source

upsert ChatMember

push-params
Evan Feenstra 5 years ago
parent
commit
804417c177
  1. 2
      api/controllers/chatTribes.ts
  2. 2
      dist/api/controllers/chatTribes.js

2
api/controllers/chatTribes.ts

@ -148,7 +148,7 @@ export async function receiveMemberRequest(payload) {
}
if(!theSender) return console.log('no sender') // fail (no contact key?)
models.ChatMember.create({
models.ChatMember.upsert({
contactId: theSender.id,
chatId: chat.id,
role: constants.chat_roles.reader,

2
dist/api/controllers/chatTribes.js

@ -150,7 +150,7 @@ function receiveMemberRequest(payload) {
}
if (!theSender)
return console.log('no sender'); // fail (no contact key?)
models_1.models.ChatMember.create({
models_1.models.ChatMember.upsert({
contactId: theSender.id,
chatId: chat.id,
role: constants.chat_roles.reader,

Loading…
Cancel
Save