|
@ -295,7 +295,8 @@ function receiveMemberApprove(payload) { |
|
|
socket.sendJson({ |
|
|
socket.sendJson({ |
|
|
type: 'member_approve', |
|
|
type: 'member_approve', |
|
|
response: { |
|
|
response: { |
|
|
message: jsonUtils.messageToJson(message, null) |
|
|
message: jsonUtils.messageToJson(message, null), |
|
|
|
|
|
chat: jsonUtils.chatToJson(chat), |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
const amount = chat.priceToJoin || 0; |
|
|
const amount = chat.priceToJoin || 0; |
|
@ -321,6 +322,9 @@ function receiveMemberReject(payload) { |
|
|
return __awaiter(this, void 0, void 0, function* () { |
|
|
return __awaiter(this, void 0, void 0, function* () { |
|
|
console.log('=> receiveMemberReject'); |
|
|
console.log('=> receiveMemberReject'); |
|
|
const { chat, sender, chat_name } = yield helpers.parseReceiveParams(payload); |
|
|
const { chat, sender, chat_name } = yield helpers.parseReceiveParams(payload); |
|
|
|
|
|
if (!chat) |
|
|
|
|
|
return console.log('no chat'); |
|
|
|
|
|
yield chat.update({ status: constants.chat_statuses.rejected }); |
|
|
// dang.. nothing really to do here?
|
|
|
// dang.. nothing really to do here?
|
|
|
let date = new Date(); |
|
|
let date = new Date(); |
|
|
date.setMilliseconds(0); |
|
|
date.setMilliseconds(0); |
|
@ -336,7 +340,8 @@ function receiveMemberReject(payload) { |
|
|
socket.sendJson({ |
|
|
socket.sendJson({ |
|
|
type: 'member_reject', |
|
|
type: 'member_reject', |
|
|
response: { |
|
|
response: { |
|
|
message: jsonUtils.messageToJson(message, null) |
|
|
message: jsonUtils.messageToJson(message, null), |
|
|
|
|
|
chat: jsonUtils.chatToJson(chat), |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
hub_1.sendNotification(chat, chat_name, 'reject'); |
|
|
hub_1.sendNotification(chat, chat_name, 'reject'); |
|
|