Browse Source

dont rm Chat on group_kick

bugfix/timeout-logging
Evan Feenstra 5 years ago
parent
commit
b1da9174d2
  1. 20
      api/controllers/chats.ts
  2. 20
      dist/api/controllers/chats.js
  3. 2
      dist/api/controllers/chats.js.map

20
api/controllers/chats.ts

@ -62,16 +62,16 @@ export async function receiveGroupKick(payload) {
if (!chat) return
const owner = await models.Contact.findOne({where:{isOwner:true}})
await chat.update({
deleted: true,
uuid:'',
groupKey:'',
host:'',
photoUrl:'',
contactIds:'[]',
name:''
})
await models.Message.destroy({ where: { chatId: chat.id } })
// await chat.update({
// deleted: true,
// uuid:'',
// groupKey:'',
// host:'',
// photoUrl:'',
// contactIds:'[]',
// name:''
// })
// await models.Message.destroy({ where: { chatId: chat.id } })
socket.sendJson({
type: 'group_kick',
response: {

20
dist/api/controllers/chats.js

@ -68,16 +68,16 @@ function receiveGroupKick(payload) {
if (!chat)
return;
const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } });
yield chat.update({
deleted: true,
uuid: '',
groupKey: '',
host: '',
photoUrl: '',
contactIds: '[]',
name: ''
});
yield models_1.models.Message.destroy({ where: { chatId: chat.id } });
// await chat.update({
// deleted: true,
// uuid:'',
// groupKey:'',
// host:'',
// photoUrl:'',
// contactIds:'[]',
// name:''
// })
// await models.Message.destroy({ where: { chatId: chat.id } })
socket.sendJson({
type: 'group_kick',
response: {

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

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