Browse Source

Merge pull request #56 from stakwork/kick2

kick
bugfix/timeout-logging
Evan Feenstra 5 years ago
committed by GitHub
parent
commit
d39bfc90c0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 136
      api/controllers/chats.ts
  2. 1
      api/controllers/index.ts
  3. 5
      api/utils/timers.ts
  4. 2
      config/constants.json
  5. 135
      dist/api/controllers/chats.js
  6. 2
      dist/api/controllers/chats.js.map
  7. 1
      dist/api/controllers/index.js
  8. 2
      dist/api/controllers/index.js.map
  9. 8
      dist/api/utils/timers.js
  10. 2
      dist/api/utils/timers.js.map
  11. 2
      dist/config/constants.json

136
api/controllers/chats.ts

@ -30,20 +30,90 @@ export async function kickChatMember(req, res){
chatId, contactId,
}})
const contact = await models.Contact.findOne({where:{id:contactId}})
const members = {
[contact.publicKey]: {key:contact.contactKey, alias:contact.alias}
}
const kickedContact = await models.Contact.findOne({where:{id:contactId}})
const owner = await models.Contact.findOne({ where: { isOwner: true } })
network.sendMessage({
chat: { ...chat.dataValues, contactIds:[contactId], members }, // send only to the guy u kicked
sender: contact,
chat: { ...chat.dataValues, contactIds:[contactId] }, // send only to the guy u kicked
sender: owner,
message: {},
type: constants.message_types.group_leave,
type: constants.message_types.group_kick,
})
// delete all timers for this member
timers.removeTimersByContactId(contactId)
success(res, true)
timers.removeTimersByContactIdChatId(contactId,chatId)
if(kickedContact){
// send group_leave to others
network.sendMessage({
chat: {...chat.dataValues, contactIds:newContactIds},
sender: {...owner.dataValues, alias:kickedContact.alias},
message: {},
type: constants.message_types.group_leave,
})
var date = new Date()
date.setMilliseconds(0)
const msg:{[k:string]:any} = {
chatId: chat.id,
type: constants.message_types.group_leave,
sender: (kickedContact.id) || 0,
messageContent:'', remoteMessageContent:'',
status: constants.statuses.confirmed,
date:date, createdAt:date, updatedAt:date,
senderAlias: kickedContact.alias
}
const message = await models.Message.create(msg)
socket.sendJson({
type: 'group_leave',
response: {
contact: jsonUtils.contactToJson(kickedContact),
chat: jsonUtils.chatToJson(chat),
message: jsonUtils.messageToJson(message, null)
}
})
}
success(res, jsonUtils.chatToJson(chat))
}
export async function receiveGroupKick(payload) {
console.log('=> receiveGroupKick')
const { chat, sender, date_string } = await helpers.parseReceiveParams(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 } })
var date = new Date();
date.setMilliseconds(0)
if(date_string) date=new Date(date_string)
const msg:{[k:string]:any} = {
chatId: chat.id,
type: constants.message_types.group_kick,
sender: (sender && sender.id) || 0,
messageContent:'', remoteMessageContent:'',
status: constants.statuses.confirmed,
date: date, createdAt: date, updatedAt: date,
}
const message = await models.Message.create(msg)
socket.sendJson({
type: 'group_kick',
response: {
contact: jsonUtils.contactToJson(sender),
chat: jsonUtils.chatToJson(chat),
message: jsonUtils.messageToJson(message, null)
}
})
}
export async function getChats(req, res) {
@ -300,12 +370,9 @@ export async function receiveGroupJoin(payload) {
chatId: chat.id,
type: constants.message_types.group_join,
sender: (theSender && theSender.id) || 0,
date: date,
messageContent:'',//`${senderAlias} has joined the group`,
remoteMessageContent:'',
messageContent:'', remoteMessageContent:'',
status: constants.statuses.confirmed,
createdAt: date,
updatedAt: date
date: date, createdAt: date, updatedAt: date
}
if(isTribe) {
msg.senderAlias = sender_alias
@ -324,7 +391,7 @@ export async function receiveGroupJoin(payload) {
export async function receiveGroupLeave(payload) {
console.log('=> receiveGroupLeave')
const { sender_pub_key, chat_uuid, chat_type, sender_alias, isTribeOwner, date_string, chat_members } = await helpers.parseReceiveParams(payload)
const { sender_pub_key, chat_uuid, chat_type, sender_alias, isTribeOwner, date_string } = await helpers.parseReceiveParams(payload)
const chat = await models.Chat.findOne({ where: { uuid: chat_uuid } })
if (!chat) return
@ -353,38 +420,6 @@ export async function receiveGroupLeave(payload) {
})
}
}
} else {
console.log('==> received leave as subsribers')
// check if im in "members", if so i've been kicked out!
const owner = await models.Contact.findOne({where:{isOwner:true}})
let imKickedOut = false
for (let pubkey of Object.keys(chat_members)) {
console.log('==> member pubkey', pubkey, owner.publicKey)
if(pubkey===owner.publicKey) {
imKickedOut = true
}
}
if(imKickedOut) {
console.log('==> IM kicked out!')
await chat.update({
deleted: true,
uuid:'',
groupKey:'',
host:'',
photoUrl:'',
contactIds:'[]',
name:''
})
await models.Message.destroy({ where: { chatId: chat.id } })
socket.sendJson({
type: 'group_leave',
response: {
contact: jsonUtils.contactToJson(owner),
chat: jsonUtils.chatToJson(chat),
}
})
return // done - I've been kicked out
}
}
var date = new Date();
@ -394,12 +429,9 @@ export async function receiveGroupLeave(payload) {
chatId: chat.id,
type: constants.message_types.group_leave,
sender: (sender && sender.id) || 0,
date: date,
messageContent:'', //`${sender_alias} has left the group`,
remoteMessageContent:'',
messageContent:'', remoteMessageContent:'',
status: constants.statuses.confirmed,
createdAt: date,
updatedAt: date
date: date, createdAt: date, updatedAt: date
}
if(isTribe) {
msg.senderAlias = sender_alias

1
api/controllers/index.ts

@ -132,6 +132,7 @@ export const ACTIONS = {
[msgtypes.group_invite]: chats.receiveGroupCreateOrInvite,
[msgtypes.group_join]: chats.receiveGroupJoin,
[msgtypes.group_leave]: chats.receiveGroupLeave,
[msgtypes.group_kick]: chats.receiveGroupKick,
[msgtypes.delete]: messages.receiveDeleteMessage,
[msgtypes.repayment]: ()=>{},
}

5
api/utils/timers.ts

@ -19,6 +19,11 @@ export async function removeTimersByContactId(contactId){
ts.forEach(t=> clearTimer(t))
models.Timer.destroy({where:{receiver:contactId}})
}
export async function removeTimersByContactIdChatId(contactId,chatId){
const ts = await models.Timer.findAll({where:{receiver:contactId, chatId}})
ts.forEach(t=> clearTimer(t))
models.Timer.destroy({where:{receiver:contactId, chatId}})
}
export async function addTimer({amount, millis, receiver, msgId, chatId}){
const now = new Date().valueOf()

2
config/constants.json

@ -37,7 +37,7 @@
"group_invite": 13,
"group_join": 14,
"group_leave": 15,
"group_query": 16,
"group_kick": 16,
"delete": 17,
"repayment": 18
},

135
dist/api/controllers/chats.js

@ -38,22 +38,90 @@ function kickChatMember(req, res) {
yield models_1.models.ChatMember.destroy({ where: {
chatId, contactId,
} });
const contact = yield models_1.models.Contact.findOne({ where: { id: contactId } });
const members = {
[contact.publicKey]: { key: contact.contactKey, alias: contact.alias }
};
const kickedContact = yield models_1.models.Contact.findOne({ where: { id: contactId } });
const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } });
network.sendMessage({
chat: Object.assign(Object.assign({}, chat.dataValues), { contactIds: [contactId], members }),
sender: contact,
chat: Object.assign(Object.assign({}, chat.dataValues), { contactIds: [contactId] }),
sender: owner,
message: {},
type: constants.message_types.group_leave,
type: constants.message_types.group_kick,
});
// delete all timers for this member
timers.removeTimersByContactId(contactId);
res_1.success(res, true);
timers.removeTimersByContactIdChatId(contactId, chatId);
if (kickedContact) {
// send group_leave to others
network.sendMessage({
chat: Object.assign(Object.assign({}, chat.dataValues), { contactIds: newContactIds }),
sender: Object.assign(Object.assign({}, owner.dataValues), { alias: kickedContact.alias }),
message: {},
type: constants.message_types.group_leave,
});
var date = new Date();
date.setMilliseconds(0);
const msg = {
chatId: chat.id,
type: constants.message_types.group_leave,
sender: (kickedContact.id) || 0,
messageContent: '', remoteMessageContent: '',
status: constants.statuses.confirmed,
date: date, createdAt: date, updatedAt: date,
senderAlias: kickedContact.alias
};
const message = yield models_1.models.Message.create(msg);
socket.sendJson({
type: 'group_leave',
response: {
contact: jsonUtils.contactToJson(kickedContact),
chat: jsonUtils.chatToJson(chat),
message: jsonUtils.messageToJson(message, null)
}
});
}
res_1.success(res, jsonUtils.chatToJson(chat));
});
}
exports.kickChatMember = kickChatMember;
function receiveGroupKick(payload) {
return __awaiter(this, void 0, void 0, function* () {
console.log('=> receiveGroupKick');
const { chat, sender, date_string } = yield helpers.parseReceiveParams(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 } })
var date = new Date();
date.setMilliseconds(0);
if (date_string)
date = new Date(date_string);
const msg = {
chatId: chat.id,
type: constants.message_types.group_kick,
sender: (sender && sender.id) || 0,
messageContent: '', remoteMessageContent: '',
status: constants.statuses.confirmed,
date: date, createdAt: date, updatedAt: date,
};
const message = yield models_1.models.Message.create(msg);
socket.sendJson({
type: 'group_kick',
response: {
contact: jsonUtils.contactToJson(sender),
chat: jsonUtils.chatToJson(chat),
message: jsonUtils.messageToJson(message, null)
}
});
});
}
exports.receiveGroupKick = receiveGroupKick;
function getChats(req, res) {
return __awaiter(this, void 0, void 0, function* () {
const chats = yield models_1.models.Chat.findAll({ where: { deleted: false }, raw: true });
@ -287,12 +355,9 @@ function receiveGroupJoin(payload) {
chatId: chat.id,
type: constants.message_types.group_join,
sender: (theSender && theSender.id) || 0,
date: date,
messageContent: '',
remoteMessageContent: '',
messageContent: '', remoteMessageContent: '',
status: constants.statuses.confirmed,
createdAt: date,
updatedAt: date
date: date, createdAt: date, updatedAt: date
};
if (isTribe) {
msg.senderAlias = sender_alias;
@ -312,7 +377,7 @@ exports.receiveGroupJoin = receiveGroupJoin;
function receiveGroupLeave(payload) {
return __awaiter(this, void 0, void 0, function* () {
console.log('=> receiveGroupLeave');
const { sender_pub_key, chat_uuid, chat_type, sender_alias, isTribeOwner, date_string, chat_members } = yield helpers.parseReceiveParams(payload);
const { sender_pub_key, chat_uuid, chat_type, sender_alias, isTribeOwner, date_string } = yield helpers.parseReceiveParams(payload);
const chat = yield models_1.models.Chat.findOne({ where: { uuid: chat_uuid } });
if (!chat)
return;
@ -340,39 +405,6 @@ function receiveGroupLeave(payload) {
}
}
}
else {
console.log('==> received leave as subsribers');
// check if im in "members", if so i've been kicked out!
const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } });
let imKickedOut = false;
for (let pubkey of Object.keys(chat_members)) {
console.log('==> member pubkey', pubkey, owner.publicKey);
if (pubkey === owner.publicKey) {
imKickedOut = true;
}
}
if (imKickedOut) {
console.log('==> IM kicked out!');
yield chat.update({
deleted: true,
uuid: '',
groupKey: '',
host: '',
photoUrl: '',
contactIds: '[]',
name: ''
});
yield models_1.models.Message.destroy({ where: { chatId: chat.id } });
socket.sendJson({
type: 'group_leave',
response: {
contact: jsonUtils.contactToJson(owner),
chat: jsonUtils.chatToJson(chat),
}
});
return; // done - I've been kicked out
}
}
var date = new Date();
date.setMilliseconds(0);
if (date_string)
@ -381,12 +413,9 @@ function receiveGroupLeave(payload) {
chatId: chat.id,
type: constants.message_types.group_leave,
sender: (sender && sender.id) || 0,
date: date,
messageContent: '',
remoteMessageContent: '',
messageContent: '', remoteMessageContent: '',
status: constants.statuses.confirmed,
createdAt: date,
updatedAt: date
date: date, createdAt: date, updatedAt: date
};
if (isTribe) {
msg.senderAlias = sender_alias;

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

File diff suppressed because one or more lines are too long

1
dist/api/controllers/index.js

@ -130,6 +130,7 @@ exports.ACTIONS = {
[msgtypes.group_invite]: chats.receiveGroupCreateOrInvite,
[msgtypes.group_join]: chats.receiveGroupJoin,
[msgtypes.group_leave]: chats.receiveGroupLeave,
[msgtypes.group_kick]: chats.receiveGroupKick,
[msgtypes.delete]: messages.receiveDeleteMessage,
[msgtypes.repayment]: () => { },
};

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

File diff suppressed because one or more lines are too long

8
dist/api/utils/timers.js

@ -35,6 +35,14 @@ function removeTimersByContactId(contactId) {
});
}
exports.removeTimersByContactId = removeTimersByContactId;
function removeTimersByContactIdChatId(contactId, chatId) {
return __awaiter(this, void 0, void 0, function* () {
const ts = yield models_1.models.Timer.findAll({ where: { receiver: contactId, chatId } });
ts.forEach(t => clearTimer(t));
models_1.models.Timer.destroy({ where: { receiver: contactId, chatId } });
});
}
exports.removeTimersByContactIdChatId = removeTimersByContactIdChatId;
function addTimer({ amount, millis, receiver, msgId, chatId }) {
return __awaiter(this, void 0, void 0, function* () {
const now = new Date().valueOf();

2
dist/api/utils/timers.js.map

@ -1 +1 @@
{"version":3,"file":"timers.js","sourceRoot":"","sources":["../../../api/utils/timers.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAkC;AAClC,sCAAqC;AACrC,6BAA4B;AAE5B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAE7E,MAAM,MAAM,GAAC,EAAE,CAAA;AACf,SAAS,UAAU,CAAC,CAAC;IACjB,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IACxB,IAAG,IAAI;QAAE,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;AACvC,CAAC;AACD,SAAsB,kBAAkB,CAAC,KAAK;;QAC1C,MAAM,CAAC,GAAG,MAAM,eAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAC,KAAK,EAAC,EAAC,KAAK,EAAC,EAAC,CAAC,CAAA;QACrD,UAAU,CAAC,CAAC,CAAC,CAAA;QACb,eAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAC,KAAK,EAAC,EAAC,KAAK,EAAC,EAAC,CAAC,CAAA;IACzC,CAAC;CAAA;AAJD,gDAIC;AACD,SAAsB,uBAAuB,CAAC,SAAS;;QACnD,MAAM,EAAE,GAAG,MAAM,eAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAC,KAAK,EAAC,EAAC,QAAQ,EAAC,SAAS,EAAC,EAAC,CAAC,CAAA;QACnE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;QAC7B,eAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAC,KAAK,EAAC,EAAC,QAAQ,EAAC,SAAS,EAAC,EAAC,CAAC,CAAA;IACtD,CAAC;CAAA;AAJD,0DAIC;AAED,S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K,EAAC,EAAC,EAAE,EAAC,CAAC,CAAC,EAAE,EAAC,EAAC,CAAC,CAAA;YACvC,OAAM;SACT;QACD,MAAM,OAAO,mCAAO,IAAI,CAAC,UAAU,KAAE,UAAU,EAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAC,CAAA;QAC7D,OAAO,CAAC,WAAW,CAAC;YAChB,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAC,EAAE,EAAC,CAAC,CAAC,KAAK,EAAC,MAAM,EAAC,CAAC,CAAC,MAAM,EAAC;YACrC,MAAM,EAAE,CAAC,CAAC,MAAM;YAChB,IAAI,EAAE,SAAS,CAAC,aAAa,CAAC,SAAS;SAC1C,CAAC,CAAA;QACF,eAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAC,KAAK,EAAC,EAAC,EAAE,EAAC,CAAC,CAAC,EAAE,EAAC,EAAC,CAAC,CAAA;IAC3C,CAAC;CAAA;AAhBD,0BAgBC"}

2
dist/config/constants.json

@ -37,7 +37,7 @@
"group_invite": 13,
"group_join": 14,
"group_leave": 15,
"group_query": 16,
"group_kick": 16,
"delete": 17,
"repayment": 18
},

Loading…
Cancel
Save