Browse Source

allow empty string in PUT chat my_photo_url

dependabot/npm_and_yarn/ini-1.3.7
Evan Feenstra 4 years ago
parent
commit
3f4f6fcdcb
  1. 4
      dist/src/controllers/chatTribes.js
  2. 2
      dist/src/controllers/chatTribes.js.map
  3. 2
      dist/src/controllers/chats.js
  4. 2
      dist/src/controllers/chats.js.map
  5. 2
      src/controllers/chats.ts

4
dist/src/controllers/chatTribes.js

@ -21,10 +21,6 @@ const hub_1 = require("../hub");
const msg_1 = require("../utils/msg"); const msg_1 = require("../utils/msg");
const sequelize_1 = require("sequelize"); const sequelize_1 = require("sequelize");
const constants_1 = require("../constants"); const constants_1 = require("../constants");
/*
add myAlias to leave tribe also
sphinx.chat://?action=tribe&uuid=XyyNsiAM4pbbX4vjtYz2kcFye-h4dd9Nd2twi2Az8gGDQdIbM3HU1WV3XoASXLedCaVpl0YrAvjvBpAPt9ZB0-rpV4Y1&host=tribes.sphinx.chat
*/
function joinTribe(req, res) { function joinTribe(req, res) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
console.log('=> joinTribe'); console.log('=> joinTribe');

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

File diff suppressed because one or more lines are too long

2
dist/src/controllers/chats.js

@ -42,7 +42,7 @@ function updateChat(req, res) {
obj.meta = meta; obj.meta = meta;
if (my_alias) if (my_alias)
obj.myAlias = my_alias; obj.myAlias = my_alias;
if (my_photo_url) if (my_photo_url || my_photo_url === "")
obj.myPhotoUrl = my_photo_url; obj.myPhotoUrl = my_photo_url;
if (Object.keys(obj).length > 0) { if (Object.keys(obj).length > 0) {
yield chat.update(obj); yield chat.update(obj);

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

File diff suppressed because one or more lines are too long

2
src/controllers/chats.ts

@ -28,7 +28,7 @@ export async function updateChat(req, res){
if(photo_url) obj.photoUrl=photo_url if(photo_url) obj.photoUrl=photo_url
if(meta && typeof meta==='string') obj.meta=meta if(meta && typeof meta==='string') obj.meta=meta
if(my_alias) obj.myAlias=my_alias if(my_alias) obj.myAlias=my_alias
if(my_photo_url) obj.myPhotoUrl=my_photo_url if(my_photo_url || my_photo_url==="") obj.myPhotoUrl=my_photo_url
if(Object.keys(obj).length>0) { if(Object.keys(obj).length>0) {
await chat.update(obj) await chat.update(obj)

Loading…
Cancel
Save