Browse Source

fix photoUrl on join tribe

feature/dockerfile-arm
Evan Feenstra 4 years ago
parent
commit
c4e516e5d9
  1. 3
      api/controllers/chats.ts
  2. 3
      dist/api/controllers/chats.js
  3. 2
      dist/api/controllers/chats.js.map

3
api/controllers/chats.ts

@ -201,7 +201,7 @@ const deleteChat = async (req, res) => {
async function joinTribe(req, res){
console.log('=> joinTribe')
const { uuid, group_key, name, host, amount } = req.body
const { uuid, group_key, name, host, amount, img } = req.body
const existing = await models.Chat.findOne({where:{uuid}})
if(existing) {
@ -236,6 +236,7 @@ async function joinTribe(req, res){
const chatParams = {
uuid: uuid,
contactIds: JSON.stringify(contactIds),
photoUrl: img||'',
createdAt: date,
updatedAt: date,
name: name,

3
dist/api/controllers/chats.js

@ -194,7 +194,7 @@ exports.deleteChat = deleteChat;
function joinTribe(req, res) {
return __awaiter(this, void 0, void 0, function* () {
console.log('=> joinTribe');
const { uuid, group_key, name, host, amount } = req.body;
const { uuid, group_key, name, host, amount, img } = req.body;
const existing = yield models_1.models.Chat.findOne({ where: { uuid } });
if (existing) {
console.log('[tribes] u are already in this group');
@ -225,6 +225,7 @@ function joinTribe(req, res) {
const chatParams = {
uuid: uuid,
contactIds: JSON.stringify(contactIds),
photoUrl: img || '',
createdAt: date,
updatedAt: date,
name: name,

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

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