From 53f4f598819a6d341547341bed2a0b577820635c Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Thu, 4 Jun 2020 12:40:31 -0700 Subject: [PATCH] add reply_uuid --- api/controllers/chatTribes.ts | 1 - api/controllers/messages.ts | 19 ++++++++++++------- api/helpers.ts | 3 ++- api/hub.ts | 14 ++++++++++++++ api/models/ts/message.ts | 3 +++ dist/api/controllers/chatTribes.js | 1 - dist/api/controllers/chatTribes.js.map | 2 +- dist/api/controllers/messages.js | 21 ++++++++++++++------- dist/api/controllers/messages.js.map | 2 +- dist/api/helpers.js | 3 ++- dist/api/helpers.js.map | 2 +- dist/api/hub.js | 11 +++++++++++ dist/api/hub.js.map | 2 +- dist/api/models/ts/message.js | 4 ++++ dist/api/models/ts/message.js.map | 2 +- 15 files changed, 67 insertions(+), 23 deletions(-) diff --git a/api/controllers/chatTribes.ts b/api/controllers/chatTribes.ts index 9becf3c..f720dc5 100644 --- a/api/controllers/chatTribes.ts +++ b/api/controllers/chatTribes.ts @@ -166,7 +166,6 @@ async function replayChatHistory(chat, contact) { let content = '' try {content = JSON.parse(m.remoteMessageContent)} catch(e) {} - console.log(m.date, typeof m.date, m.date.toISOString()) const dateString = m.date&&m.date.toISOString() let mediaKeyMap let newMediaTerms diff --git a/api/controllers/messages.ts b/api/controllers/messages.ts index bc59360..acd2050 100644 --- a/api/controllers/messages.ts +++ b/api/controllers/messages.ts @@ -108,6 +108,7 @@ const sendMessage = async (req, res) => { chat_id, remote_text_map, amount, + reply_uuid, } = req.body var date = new Date(); @@ -121,7 +122,7 @@ const sendMessage = async (req, res) => { }) const remoteMessageContent = remote_text_map?JSON.stringify(remote_text_map) : remote_text - const msg={ + const msg:{[k:string]:any}={ chatId: chat.id, uuid: short.generate(), type: constants.message_types.message, @@ -134,21 +135,24 @@ const sendMessage = async (req, res) => { createdAt: date, updatedAt: date, } + if(reply_uuid) msg.replyUuid=reply_uuid // console.log(msg) const message = await models.Message.create(msg) success(res, jsonUtils.messageToJson(message, chat)) + const msgToSend:{[k:string]:any} = { + id: message.id, + uuid: message.uuid, + content: remote_text_map || remote_text || text + } + if(reply_uuid) msgToSend.replyUuid=reply_uuid network.sendMessage({ chat: chat, sender: owner, amount: amount||0, type: constants.message_types.message, - message: { - id: message.id, - uuid: message.uuid, - content: remote_text_map || remote_text || text - } + message: msgToSend, }) } @@ -159,7 +163,7 @@ const receiveMessage = async (payload) => { date.setMilliseconds(0) const total_spent = 1 - const {owner, sender, chat, content, remote_content, msg_id, chat_type, sender_alias, msg_uuid, date_string} = await helpers.parseReceiveParams(payload) + const {owner, sender, chat, content, remote_content, msg_id, chat_type, sender_alias, msg_uuid, date_string, reply_uuid} = await helpers.parseReceiveParams(payload) if(!owner || !sender || !chat) { return console.log('=> no group chat!') } @@ -183,6 +187,7 @@ const receiveMessage = async (payload) => { msg.senderAlias = sender_alias if(remote_content) msg.remoteMessageContent=remote_content } + if(reply_uuid) msg.replyUuid = reply_uuid const message = await models.Message.create(msg) // console.log('saved message', message.dataValues) diff --git a/api/helpers.ts b/api/helpers.ts index be3f730..2c1227b 100644 --- a/api/helpers.ts +++ b/api/helpers.ts @@ -151,6 +151,7 @@ async function parseReceiveParams(payload) { const mediaKey = dat.message.mediaKey const mediaType = dat.message.mediaType const date_string = dat.message.date + const reply_uuid = dat.message.replyUuid const isTribeOwner = dat.isTribeOwner?true:false const isConversation = !chat_type || (chat_type && chat_type == constants.chat_types.conversation) @@ -173,7 +174,7 @@ async function parseReceiveParams(payload) { } chat = await models.Chat.findOne({ where: { uuid: chat_uuid } }) } - return { owner, sender, chat, sender_pub_key, sender_alias, isTribeOwner, chat_uuid, amount, content, mediaToken, mediaKey, mediaType, originalMuid, chat_type, msg_id, chat_members, chat_name, chat_host, chat_key, remote_content, msg_uuid, date_string } + return { owner, sender, chat, sender_pub_key, sender_alias, isTribeOwner, chat_uuid, amount, content, mediaToken, mediaKey, mediaType, originalMuid, chat_type, msg_id, chat_members, chat_name, chat_host, chat_key, remote_content, msg_uuid, date_string, reply_uuid } } export { diff --git a/api/hub.ts b/api/hub.ts index 731de28..693ecd7 100644 --- a/api/hub.ts +++ b/api/hub.ts @@ -223,6 +223,12 @@ const sendNotification = async (chat, name, type) => { const unseenMessages = await models.Message.count({ where: { sender: { [Op.ne]: owner.id }, seen: false } }) + // if(type==='message' && chat.type==constants.chat_types.tribe){ + // debounce(()=>{ + + // },) + // } + const params = { device_id: owner.deviceId, notification: { @@ -253,3 +259,11 @@ export { payInviteInHub, payInviteInvoice } + +// let inDebounce +// function debounce(func, delay) { +// const context = this +// const args = arguments +// clearTimeout(inDebounce) +// inDebounce = setTimeout(() => func.apply(context, args), delay) +// } diff --git a/api/models/ts/message.ts b/api/models/ts/message.ts index cda7065..cfd9b5b 100644 --- a/api/models/ts/message.ts +++ b/api/models/ts/message.ts @@ -89,4 +89,7 @@ export default class Message extends Model { @Column originalMuid: string // for tribe, remember the og muid + + @Column + replyUuid: string } \ No newline at end of file diff --git a/dist/api/controllers/chatTribes.js b/dist/api/controllers/chatTribes.js index 4577f3f..f959f8e 100644 --- a/dist/api/controllers/chatTribes.js +++ b/dist/api/controllers/chatTribes.js @@ -164,7 +164,6 @@ function replayChatHistory(chat, contact) { content = JSON.parse(m.remoteMessageContent); } catch (e) { } - console.log(m.date, typeof m.date, m.date.toISOString()); const dateString = m.date && m.date.toISOString(); let mediaKeyMap; let newMediaTerms; diff --git a/dist/api/controllers/chatTribes.js.map b/dist/api/controllers/chatTribes.js.map index 2b23651..c6556c6 100644 --- a/dist/api/controllers/chatTribes.js.map +++ b/dist/api/controllers/chatTribes.js.map @@ -1 +1 @@ -{"version":3,"file":"chatTribes.js","sourceRoot":"","sources":["../../../api/controllers/chatTribes.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAkC;AAClC,2CAA0C;AAC1C,sCAA+C;AAC/C,sCAAqC;AACrC,qCAAoC;AACpC,0CAAyC;AACzC,6BAA4B;AAC5B,sCAA+D;AAC/D,yCAA8B;AAE9B,MAAM,SAAS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,IAAE,CAAC;YACrC,WAAW,EAAE,aAAa,IAAE,CAAC;SAC7B,CAAA;IACF,CAAC;CAAA;AAKG,sDAAqB;AAGzB,SAAe,YAAY,CAAC,KAAK,EAAE,QAAQ;;QAC1C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAChD,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC7C;IACF,CAAC;CAAA"} \ No newline at end of file diff --git a/dist/api/controllers/messages.js b/dist/api/controllers/messages.js index 7fa7186..570b4a5 100644 --- a/dist/api/controllers/messages.js +++ b/dist/api/controllers/messages.js @@ -98,7 +98,7 @@ const sendMessage = (req, res) => __awaiter(void 0, void 0, void 0, function* () // } catch(e) { // return failure(res, e.message) // } - const { contact_id, text, remote_text, chat_id, remote_text_map, amount, } = req.body; + const { contact_id, text, remote_text, chat_id, remote_text_map, amount, reply_uuid, } = req.body; var date = new Date(); date.setMilliseconds(0); const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); @@ -121,19 +121,24 @@ const sendMessage = (req, res) => __awaiter(void 0, void 0, void 0, function* () createdAt: date, updatedAt: date, }; + if (reply_uuid) + msg.replyUuid = reply_uuid; // console.log(msg) const message = yield models_1.models.Message.create(msg); res_1.success(res, jsonUtils.messageToJson(message, chat)); + const msgToSend = { + id: message.id, + uuid: message.uuid, + content: remote_text_map || remote_text || text + }; + if (reply_uuid) + msgToSend.replyUuid = reply_uuid; network.sendMessage({ chat: chat, sender: owner, amount: amount || 0, type: constants.message_types.message, - message: { - id: message.id, - uuid: message.uuid, - content: remote_text_map || remote_text || text - } + message: msgToSend, }); }); exports.sendMessage = sendMessage; @@ -142,7 +147,7 @@ const receiveMessage = (payload) => __awaiter(void 0, void 0, void 0, function* var date = new Date(); date.setMilliseconds(0); const total_spent = 1; - const { owner, sender, chat, content, remote_content, msg_id, chat_type, sender_alias, msg_uuid, date_string } = yield helpers.parseReceiveParams(payload); + const { owner, sender, chat, content, remote_content, msg_id, chat_type, sender_alias, msg_uuid, date_string, reply_uuid } = yield helpers.parseReceiveParams(payload); if (!owner || !sender || !chat) { return console.log('=> no group chat!'); } @@ -166,6 +171,8 @@ const receiveMessage = (payload) => __awaiter(void 0, void 0, void 0, function* if (remote_content) msg.remoteMessageContent = remote_content; } + if (reply_uuid) + msg.replyUuid = reply_uuid; const message = yield models_1.models.Message.create(msg); // console.log('saved message', message.dataValues) socket.sendJson({ diff --git a/dist/api/controllers/messages.js.map b/dist/api/controllers/messages.js.map index 4b4b2d6..88974a9 100644 --- a/dist/api/controllers/messages.js.map +++ b/dist/api/controllers/messages.js.map @@ -1 +1 @@ -{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../api/controllers/messages.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,yCAA8B;AAC9B,2CAAoC;AACpC,gCAAyC;AACzC,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AACrC,sCAAsC;AACtC,mDAAgD;AAChD,6BAA4B;AAC5B,sCAAqC;AACrC,oCAAmC;AAEnC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAE7E,MAAM,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IACtC,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;IAEpC,IAAI,CAAC,YAAY,EAAE;QAClB,OAAO,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAC/B;IACD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IACzB,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;IACxE,mCA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CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE;aACf;YACD,MAAM,EAAE,OAAO;SAChB;KACD,CAAC,CAAC;IAEH,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA,CAAA;AAaC,oCAAY;AAXd,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IAClC,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAErD,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA;AAMC,sCAAa"} \ No newline at end of file +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../api/controllers/messages.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,yCAA8B;AAC9B,2CAAoC;AACpC,gCAAyC;AACzC,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AACrC,sCAAsC;AACtC,mDAAgD;AAChD,6BAA4B;AAC5B,sCAAqC;AACrC,oCAAmC;AAEnC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAE7E,MAAM,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IACtC,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;IAEpC,IAAI,CAAC,YAAY,EAAE;QAClB,OAAO,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAC/B;IACD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IACzB,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;IACxE,mCAAmC;IAEnC,IAAI,gBA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AM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAC,CAAC,CAAA;IAEvE,eAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QACrC,KAAK,EAAE;YACL,MAAM,EAAE;gBACT,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE;aACf;YACD,MAAM,EAAE,OAAO;SAChB;KACD,CAAC,CAAC;IAEH,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA,CAAA;AAaC,oCAAY;AAXd,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IAClC,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAErD,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA;AAMC,sCAAa"} \ No newline at end of file diff --git a/dist/api/helpers.js b/dist/api/helpers.js index f2f9ec6..fc5dd8a 100644 --- a/dist/api/helpers.js +++ b/dist/api/helpers.js @@ -167,6 +167,7 @@ function parseReceiveParams(payload) { const mediaKey = dat.message.mediaKey; const mediaType = dat.message.mediaType; const date_string = dat.message.date; + const reply_uuid = dat.message.replyUuid; const isTribeOwner = dat.isTribeOwner ? true : false; const isConversation = !chat_type || (chat_type && chat_type == constants.chat_types.conversation); let sender; @@ -187,7 +188,7 @@ function parseReceiveParams(payload) { } chat = yield models_1.models.Chat.findOne({ where: { uuid: chat_uuid } }); } - return { owner, sender, chat, sender_pub_key, sender_alias, isTribeOwner, chat_uuid, amount, content, mediaToken, mediaKey, mediaType, originalMuid, chat_type, msg_id, chat_members, chat_name, chat_host, chat_key, remote_content, msg_uuid, date_string }; + return { owner, sender, chat, sender_pub_key, sender_alias, isTribeOwner, chat_uuid, amount, content, mediaToken, mediaKey, mediaType, originalMuid, chat_type, msg_id, chat_members, chat_name, chat_host, chat_key, remote_content, msg_uuid, date_string, reply_uuid }; }); } exports.parseReceiveParams = parseReceiveParams; diff --git a/dist/api/helpers.js.map b/dist/api/helpers.js.map index f74772f..aae90b8 100644 --- a/dist/api/helpers.js.map +++ b/dist/api/helpers.js.map @@ -1 +1 @@ -{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../api/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAAiC;AACjC,2BAA0B;AAC1B,qCAAoC;AAEpC,MAAM,SAAS,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;AAEtD,MAAM,gBAAgB,GAAG,CAAO,MAAM,EAAE,EAAE;IACzC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,MAAM,CAAA;IAClD,IAAI,IAAI,CAAA;IACR,IAAI,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IACtB,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAA;IAEvB,IAAI,OAAO,EAAE;QACZ,IAAI,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,CAAA;QAC5D,kDAAkD;KAClD;SAAM;QACN,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAA;QAC/C,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAA;QACvE,MAAM,SAAS,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,CAAC,CAAA;QAC/E,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,C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.js @@ -214,6 +214,10 @@ const sendNotification = (chat, name, type) => __awaiter(void 0, void 0, void 0, return; } const unseenMessages = yield models_1.models.Message.count({ where: { sender: { [sequelize_1.Op.ne]: owner.id }, seen: false } }); + // if(type==='message' && chat.type==constants.chat_types.tribe){ + // debounce(()=>{ + // },) + // } const params = { device_id: owner.deviceId, notification: { @@ -233,4 +237,11 @@ const sendNotification = (chat, name, type) => __awaiter(void 0, void 0, void 0, }); }); exports.sendNotification = sendNotification; +// let inDebounce +// function debounce(func, delay) { +// const context = this +// const args = arguments +// clearTimeout(inDebounce) +// inDebounce = setTimeout(() => func.apply(context, args), delay) +// } //# sourceMappingURL=hub.js.map \ No newline at end of file diff --git a/dist/api/hub.js.map b/dist/api/hub.js.map index 213b9f8..b8e3e39 100644 --- a/dist/api/hub.js.map +++ b/dist/api/hub.js.map @@ -1 +1 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../../api/hub.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA+B;AAC/B,oCAAmC;AACnC,yCAA8B;AAC9B,yCAAwC;AACxC,0CAAyC;AACzC,qCAAoC;AACpC,+CAAyC;AACzC,iDAAiD;AACjD,6BAA4B;AAE5B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,CAAC,CAAC,CAAA;AAC3E,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAEvE,MAAM,cAAc,GAAG,CAAO,MAAM,GAAG,EAAE,EAAE,EAAE;IAC3C,IAAI,GAAG,IAAI,YAAY,EAAE;QACvB,OAAM;KACP;IACD,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,E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AAG,CAAC,uDAAuD,CAAC,CAAA;QACpE,OAAM;KACP;IAED,MAAM,cAAc,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAA;IAE5G,iEAAiE;IACjE,mBAAmB;IAEnB,QAAQ;IACR,IAAI;IAEJ,MAAM,MAAM,GAAG;QACb,SAAS,EAAE,KAAK,CAAC,QAAQ;QACzB,YAAY,EAAE;YACZ,OAAO,EAAE,IAAI,CAAC,EAAE;YAChB,OAAO;YACP,KAAK,EAAE,cAAc;SACtB;KACF,CAAA;IAED,KAAK,CAAC,6CAA6C,EAAE;QACnD,MAAM,EAAE,MAAM;QACd,IAAI,EAAK,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QAC/B,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;KAChD,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;SACvB,IAAI,CAAC,IAAI,CAAC,EAAE;QACX,0CAA0C;IAC5C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA,CAAA;AAMC,4CAAgB;AAOlB,iBAAiB;AACjB,mCAAmC;AACnC,yBAAyB;AACzB,2BAA2B;AAC3B,6BAA6B;AAC7B,oEAAoE;AACpE,IAAI"} \ No newline at end of file diff --git a/dist/api/models/ts/message.js b/dist/api/models/ts/message.js index 90e2eca..3fd04c4 100644 --- a/dist/api/models/ts/message.js +++ b/dist/api/models/ts/message.js @@ -125,6 +125,10 @@ __decorate([ sequelize_typescript_1.Column, __metadata("design:type", String) ], Message.prototype, "originalMuid", void 0); +__decorate([ + sequelize_typescript_1.Column, + __metadata("design:type", String) +], Message.prototype, "replyUuid", void 0); Message = __decorate([ sequelize_typescript_1.Table({ tableName: 'sphinx_messages', underscored: true }) ], Message); diff --git a/dist/api/models/ts/message.js.map b/dist/api/models/ts/message.js.map index ab0ff0b..eb1e852 100644 --- a/dist/api/models/ts/message.js.map +++ b/dist/api/models/ts/message.js.map @@ -1 +1 @@ -{"version":3,"file":"message.js","sourceRoot":"","sources":["../../../../api/models/ts/message.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAsE;AAGtE,IAAqB,OAAO,GAA5B,MAAqB,OAAQ,SAAQ,4BAAc;CAwFlD,CAAA;AAhFC;IANC,6BAAM,CAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;QACZ,aAAa,EAAE,IAAI;KACpB,CAAC;;mCACQ;AAGV;IADC,6BAAM;;qCACK;AAGZ;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;uCACV;AAGd;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;qCACZ;AAGZ;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;uCACV;AAGd;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;yCACR;AAGhB;IADC,6BAAM,CAAC,+BAAQ,CAAC,OAAO,CAAC;;uCACX;AAGd;IADC,6BAAM,CAAC,+BAAQ,CAAC,OAAO,CAAC;;2CACP;AAGlB;IADC,6BAAM;;4CACY;AAGnB;IADC,6BAAM,CAAC,+BAAQ,CAAC,IAAI,CAAC;;+CACA;AAGtB;IADC,6BAAM;8BACD,IAAI;qCAAA;AAGV;IADC,6BAAM;8BACS,IAAI;+CAAA;AAGpB;IADC,6BAAM,CAAC,+BAAQ,CAAC,IAAI,CAAC;;+CACA;AAGtB;IADC,6BAAM,CAAC,+BAAQ,CAAC,IAAI,CAAC;;qDACM;AAG5B;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;uCACV;AAGd;IADC,6BAAM,CAAC,+BAAQ,CAAC,IAAI,CAAC;;0CACL;AAGjB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;yCACR;AAGhB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;+CACF;AAGtB;IADC,6BAAM;;yCACS;AAGhB;IADC,6BAAM;;0CACU;AAGjB;IADC,6BAAM;;2CACW;AAOlB;IALC,6BAAM,CAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,OAAO;QACtB,YAAY,EAAE,KAAK;QACnB,SAAS,EAAE,KAAK;KACjB,CAAC;;qCACW;AAGb;IADC,6BAAM;8BACI,IAAI;0CAAA;AAGf;IADC,6BAAM;8BACI,IAAI;0CAAA;AAGf;IADC,6BAAM;;4CACY;AAGnB;IADC,6BAAM;;6CACa;AAvFD,OAAO;IAD3B,4BAAK,CAAC,EAAC,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,IAAI,EAAC,CAAC;GACpC,OAAO,CAwF3B;kBAxFoB,OAAO"} \ No newline at end of file +{"version":3,"file":"message.js","sourceRoot":"","sources":["../../../../api/models/ts/message.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAsE;AAGtE,IAAqB,OAAO,GAA5B,MAAqB,OAAQ,SAAQ,4BAAc;CA2FlD,CAAA;AAnFC;IANC,6BAAM,CAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;QACZ,aAAa,EAAE,IAAI;KACpB,CAAC;;mCACQ;AAGV;IADC,6BAAM;;qCACK;AAGZ;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;uCACV;AAGd;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;qCACZ;AAGZ;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;uCACV;AAGd;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;yCACR;AAGhB;IADC,6BAAM,CAAC,+BAA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