Browse Source

fix key exchange receive

feature/dockerfile-arm v0.9.12
Evan Feenstra 5 years ago
parent
commit
04e8cb77e0
  1. 5
      api/network/receive.ts
  2. 5
      dist/api/network/receive.js
  3. 2
      dist/api/network/receive.js.map

5
api/network/receive.ts

@ -32,7 +32,10 @@ async function onReceive(payload){
const toAddIn:{[k:string]:any} = {}
const isTribe = payload.chat && payload.chat.type===constants.chat_types.tribe
let isTribeOwner = false
const chat = await models.Chat.findOne({where:{uuid:payload.chat.uuid}})
let chat
if(payload.chat) {
chat = await models.Chat.findOne({where:{uuid:payload.chat.uuid}})
}
if(isTribe) {
const tribeOwnerPubKey = chat && chat.ownerPubkey
const owner = await models.Contact.findOne({where: {isOwner:true}})

5
dist/api/network/receive.js

@ -42,7 +42,10 @@ function onReceive(payload) {
const toAddIn = {};
const isTribe = payload.chat && payload.chat.type === constants.chat_types.tribe;
let isTribeOwner = false;
const chat = yield models_1.models.Chat.findOne({ where: { uuid: payload.chat.uuid } });
let chat;
if (payload.chat) {
chat = yield models_1.models.Chat.findOne({ where: { uuid: payload.chat.uuid } });
}
if (isTribe) {
const tribeOwnerPubKey = chat && chat.ownerPubkey;
const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } });

2
dist/api/network/receive.js.map

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