Browse Source

fix

docker-workflow-build
Evan Feenstra 4 years ago
parent
commit
3580dcb9a4
  1. 4
      dist/src/controllers/contacts.js
  2. 2
      dist/src/controllers/contacts.js.map
  3. 4
      src/controllers/contacts.ts

4
dist/src/controllers/contacts.js

@ -212,10 +212,10 @@ exports.receiveContactKey = (payload) => __awaiter(void 0, void 0, void 0, funct
const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } });
const sender = yield models_1.models.Contact.findOne({ where: { publicKey: sender_pub_key, status: constants_1.default.contact_statuses.confirmed } }); const sender = yield models_1.models.Contact.findOne({ where: { publicKey: sender_pub_key, status: constants_1.default.contact_statuses.confirmed } });
let msgIncludedContactKey = false; // ??????? let msgIncludedContactKey = false; // ???????
if (sender_contact_key && sender) { if (sender_contact_key) {
if (sender_contact_key !== sender.contactKey) {
msgIncludedContactKey = true; msgIncludedContactKey = true;
} }
if (sender_contact_key && sender) {
const objToUpdate = { contactKey: sender_contact_key }; const objToUpdate = { contactKey: sender_contact_key };
if (sender_alias) if (sender_alias)
objToUpdate.alias = sender_alias; objToUpdate.alias = sender_alias;

2
dist/src/controllers/contacts.js.map

File diff suppressed because one or more lines are too long

4
src/controllers/contacts.ts

@ -234,10 +234,10 @@ export const receiveContactKey = async (payload) => {
const owner = await models.Contact.findOne({ where: { isOwner: true } }) const owner = await models.Contact.findOne({ where: { isOwner: true } })
const sender = await models.Contact.findOne({ where: { publicKey: sender_pub_key, status: constants.contact_statuses.confirmed } }) const sender = await models.Contact.findOne({ where: { publicKey: sender_pub_key, status: constants.contact_statuses.confirmed } })
let msgIncludedContactKey = false // ??????? let msgIncludedContactKey = false // ???????
if (sender_contact_key && sender) { if(sender_contact_key) {
if (sender_contact_key !== sender.contactKey) {
msgIncludedContactKey = true msgIncludedContactKey = true
} }
if (sender_contact_key && sender) {
const objToUpdate: { [k: string]: any } = { contactKey: sender_contact_key } const objToUpdate: { [k: string]: any } = { contactKey: sender_contact_key }
if (sender_alias) objToUpdate.alias = sender_alias if (sender_alias) objToUpdate.alias = sender_alias
if (sender_photo_url) objToUpdate.photoUrl = sender_photo_url if (sender_photo_url) objToUpdate.photoUrl = sender_photo_url

Loading…
Cancel
Save