Browse Source

full meme roundtrip'

feature/dockerfile-arm
Evan Feenstra 5 years ago
parent
commit
5c19211b11
  1. 8
      api/controllers/media.ts
  2. 3
      api/helpers.ts
  3. 3
      api/models/ts/mediaKey.ts
  4. 3
      api/models/ts/message.ts
  5. 22
      api/network/modify.ts
  6. 2
      api/utils/setup.ts
  7. 8
      dist/api/controllers/media.js
  8. 2
      dist/api/controllers/media.js.map
  9. 3
      dist/api/helpers.js
  10. 2
      dist/api/helpers.js.map
  11. 4
      dist/api/models/ts/mediaKey.js
  12. 2
      dist/api/models/ts/mediaKey.js.map
  13. 4
      dist/api/models/ts/message.js
  14. 2
      dist/api/models/ts/message.js.map
  15. 20
      dist/api/network/modify.js
  16. 2
      dist/api/network/modify.js.map
  17. 2
      dist/api/utils/setup.js
  18. 2
      dist/api/utils/setup.js.map

8
api/controllers/media.ts

@ -106,7 +106,7 @@ const sendAttachmentMessage = async (req, res) => {
updatedAt: date
})
saveMediaKeys(muid, media_key_map, chat.id, message.id)
saveMediaKeys(muid, media_key_map, chat.id, message.id, mediaType)
const mediaTerms: {[k:string]:any} = {
muid, ttl:TTL,
@ -134,7 +134,7 @@ const sendAttachmentMessage = async (req, res) => {
})
}
function saveMediaKeys(muid, mediaKeyMap, chatId, messageId){
function saveMediaKeys(muid, mediaKeyMap, chatId, messageId, mediaType){
if (typeof mediaKeyMap!=='object'){
console.log('wrong type for mediaKeyMap')
return
@ -148,6 +148,7 @@ function saveMediaKeys(muid, mediaKeyMap, chatId, messageId){
muid, chatId, key, messageId,
receiver: receiverID,
createdAt: date,
mediaType
})
}
}
@ -333,7 +334,7 @@ const receivePurchaseAccept = async (payload) => {
var date = new Date();
date.setMilliseconds(0)
const {owner, sender, chat, mediaToken, mediaKey, mediaType} = await helpers.parseReceiveParams(payload)
const {owner, sender, chat, mediaToken, mediaKey, mediaType, originalMuid} = await helpers.parseReceiveParams(payload)
if(!owner || !sender || !chat) {
return console.log('=> no group chat!')
}
@ -362,6 +363,7 @@ const receivePurchaseAccept = async (payload) => {
mediaToken,
mediaKey,
mediaType,
originalMuid:originalMuid||'',
date: date,
createdAt: date,
updatedAt: date

3
api/helpers.ts

@ -145,6 +145,7 @@ async function parseReceiveParams(payload) {
const content = dat.message.content
const remote_content = dat.message.remoteContent
const mediaToken = dat.message.mediaToken
const originalMuid = dat.message.originalMuid
const msg_id = dat.message.id||0
const msg_uuid = dat.message.uuid||''
const mediaKey = dat.message.mediaKey
@ -171,7 +172,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, chat_type, msg_id, chat_members, chat_name, chat_host, chat_key, remote_content, msg_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 }
}
export {

3
api/models/ts/mediaKey.ts

@ -37,6 +37,9 @@ export default class MediaKey extends Model<MediaKey> {
@Column
createdAt: Date
@Column
mediaType: string
@Column(DataType.BIGINT)
sender: number // for tribe, remember the sender

3
api/models/ts/message.ts

@ -86,4 +86,7 @@ export default class Message extends Model<Message> {
@Column
senderAlias: string // for tribes, no "sender" id maybe
@Column
originalMuid: string // for tribe, remember the og muid
}

22
api/network/modify.ts

@ -49,7 +49,12 @@ export async function purchaseFromOriginalSender(payload, chat, purchaser){
meta:{...amount && {amt:amount}},
}
// send full new key and token
const msg = {mediaTerms, mediaKey:mediaKey.key}
const msg = {
mediaTerms,
mediaKey:mediaKey.key,
originalMuid:mediaKey.originalMuid,
mediaType:mediaKey.mediaType
}
console.log("SEND PURCHASE ACCEPT FROM STORED KEY")
sendMessage({
chat: {...chat.dataValues, contactIds:[purchaser.id]},
@ -64,18 +69,7 @@ export async function purchaseFromOriginalSender(payload, chat, purchaser){
const ogmsg = await models.Message.findOne({where:{chatId:chat.id,mediaToken:mt}})
// purchase it from creator (send "purchase")
const msg={amount, mediaToken:mt}
console.log("GO AHEARD AND BUY!!! from:",ogmsg.sender,{
chat: {...chat.dataValues, contactIds:[ogmsg.sender]},
sender: {
...owner.dataValues,
...purchaser&&purchaser.alias && {alias:purchaser.alias}
},
type: constants.message_types.purchase,
message: msg,
amount: amount,
success: ()=>{},
failure: ()=>{}
})
console.log("GO AHEARD AND BUY!!!")
sendMessage({
chat: {...chat.dataValues, contactIds:[ogmsg.sender]},
sender: {
@ -131,6 +125,7 @@ export async function sendFinalMemeIfFirstPurchaser(payload, chat, sender){
message:{
...termsAndKey,
mediaType: typ,
originalMuid:muid,
},
success: ()=>{},
receive: ()=>{}
@ -227,6 +222,7 @@ export async function downloadAndUploadAndSaveReturningTermsAndKey(payload, chat
sender: sender.id, // the og sender
createdAt: date,
originalMuid: ogmuid,
mediaType:typ,
})
return {mediaTerms,mediaKey:encKey}
} catch(e) {

2
api/utils/setup.ts

@ -31,7 +31,9 @@ async function setVersion(){
}
async function migrate(){
addTableColumn('sphinx_media_keys', 'media_type')
addTableColumn('sphinx_media_keys', 'original_muid')
addTableColumn('sphinx_messages', 'original_muid')
addTableColumn('sphinx_messages', 'uuid')
addTableColumn('sphinx_messages', 'reply_uuid')

8
dist/api/controllers/media.js

@ -95,7 +95,7 @@ const sendAttachmentMessage = (req, res) => __awaiter(void 0, void 0, void 0, fu
createdAt: date,
updatedAt: date
});
saveMediaKeys(muid, media_key_map, chat.id, message.id);
saveMediaKeys(muid, media_key_map, chat.id, message.id, mediaType);
const mediaTerms = {
muid, ttl: TTL,
meta: Object.assign({}, amt && { amt }),
@ -122,7 +122,7 @@ const sendAttachmentMessage = (req, res) => __awaiter(void 0, void 0, void 0, fu
});
});
exports.sendAttachmentMessage = sendAttachmentMessage;
function saveMediaKeys(muid, mediaKeyMap, chatId, messageId) {
function saveMediaKeys(muid, mediaKeyMap, chatId, messageId, mediaType) {
if (typeof mediaKeyMap !== 'object') {
console.log('wrong type for mediaKeyMap');
return;
@ -136,6 +136,7 @@ function saveMediaKeys(muid, mediaKeyMap, chatId, messageId) {
muid, chatId, key, messageId,
receiver: receiverID,
createdAt: date,
mediaType
});
}
}
@ -303,7 +304,7 @@ const receivePurchaseAccept = (payload) => __awaiter(void 0, void 0, void 0, fun
console.log('=> receivePurchaseAccept');
var date = new Date();
date.setMilliseconds(0);
const { owner, sender, chat, mediaToken, mediaKey, mediaType } = yield helpers.parseReceiveParams(payload);
const { owner, sender, chat, mediaToken, mediaKey, mediaType, originalMuid } = yield helpers.parseReceiveParams(payload);
if (!owner || !sender || !chat) {
return console.log('=> no group chat!');
}
@ -330,6 +331,7 @@ const receivePurchaseAccept = (payload) => __awaiter(void 0, void 0, void 0, fun
mediaToken,
mediaKey,
mediaType,
originalMuid: originalMuid || '',
date: date,
createdAt: date,
updatedAt: date

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

File diff suppressed because one or more lines are too long

3
dist/api/helpers.js

@ -161,6 +161,7 @@ function parseReceiveParams(payload) {
const content = dat.message.content;
const remote_content = dat.message.remoteContent;
const mediaToken = dat.message.mediaToken;
const originalMuid = dat.message.originalMuid;
const msg_id = dat.message.id || 0;
const msg_uuid = dat.message.uuid || '';
const mediaKey = dat.message.mediaKey;
@ -185,7 +186,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, chat_type, msg_id, chat_members, chat_name, chat_host, chat_key, remote_content, msg_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 };
});
}
exports.parseReceiveParams = parseReceiveParams;

2
dist/api/helpers.js.map

File diff suppressed because one or more lines are too long

4
dist/api/models/ts/mediaKey.js

@ -52,6 +52,10 @@ __decorate([
sequelize_typescript_1.Column,
__metadata("design:type", Date)
], MediaKey.prototype, "createdAt", void 0);
__decorate([
sequelize_typescript_1.Column,
__metadata("design:type", String)
], MediaKey.prototype, "mediaType", void 0);
__decorate([
sequelize_typescript_1.Column(sequelize_typescript_1.DataType.BIGINT),
__metadata("design:type", Number)

2
dist/api/models/ts/mediaKey.js.map

@ -1 +1 @@
{"version":3,"file":"mediaKey.js","sourceRoot":"","sources":["../../../../api/models/ts/mediaKey.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAsE;AAEtE;;;;;;EAME;AAGF,IAAqB,QAAQ,GAA7B,MAAqB,QAAS,SAAQ,4BAAe;CAkCpD,CAAA;AA1BC;IANC,6BAAM,CAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;QACZ,aAAa,EAAE,IAAI;KACpB,CAAC;;oCACQ;AAGV;IADC,6BAAM;;sCACK;AAGZ;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;wCACV;AAGd;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;0CACR;AAGhB;IADC,6BAAM;;qCACI;AAGX;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;2CACP;AAGjB;IADC,6BAAM;8BACI,IAAI;2CAAA;AAGf;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;wCACV;AAGd;IADC,6BAAM;;8CACa;AAhCD,QAAQ;IAD5B,4BAAK,CAAC,EAAC,SAAS,EAAE,mBAAmB,EAAE,WAAW,EAAE,IAAI,EAAC,CAAC;GACtC,QAAQ,CAkC5B;kBAlCoB,QAAQ"}
{"version":3,"file":"mediaKey.js","sourceRoot":"","sources":["../../../../api/models/ts/mediaKey.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAsE;AAEtE;;;;;;EAME;AAGF,IAAqB,QAAQ,GAA7B,MAAqB,QAAS,SAAQ,4BAAe;CAqCpD,CAAA;AA7BC;IANC,6BAAM,CAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;QACZ,aAAa,EAAE,IAAI;KACpB,CAAC;;oCACQ;AAGV;IADC,6BAAM;;sCACK;AAGZ;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;wCACV;AAGd;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;0CACR;AAGhB;IADC,6BAAM;;qCACI;AAGX;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;2CACP;AAGjB;IADC,6BAAM;8BACI,IAAI;2CAAA;AAGf;IADC,6BAAM;;2CACU;AAGjB;IADC,6BAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC;;wCACV;AAGd;IADC,6BAAM;;8CACa;AAnCD,QAAQ;IAD5B,4BAAK,CAAC,EAAC,SAAS,EAAE,mBAAmB,EAAE,WAAW,EAAE,IAAI,EAAC,CAAC;GACtC,QAAQ,CAqC5B;kBArCoB,QAAQ"}

4
dist/api/models/ts/message.js

@ -121,6 +121,10 @@ __decorate([
sequelize_typescript_1.Column,
__metadata("design:type", String)
], Message.prototype, "senderAlias", void 0);
__decorate([
sequelize_typescript_1.Column,
__metadata("design:type", String)
], Message.prototype, "originalMuid", void 0);
Message = __decorate([
sequelize_typescript_1.Table({ tableName: 'sphinx_messages', underscored: true })
], Message);

2
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;CAqFlD,CAAA;AA7EC;IANC,6BAAM,CAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;QACZ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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"}

20
dist/api/network/modify.js

@ -61,7 +61,12 @@ function purchaseFromOriginalSender(payload, chat, purchaser) {
meta: Object.assign({}, amount && { amt: amount }),
};
// send full new key and token
const msg = { mediaTerms, mediaKey: mediaKey.key };
const msg = {
mediaTerms,
mediaKey: mediaKey.key,
originalMuid: mediaKey.originalMuid,
mediaType: mediaKey.mediaType
};
console.log("SEND PURCHASE ACCEPT FROM STORED KEY");
send_1.sendMessage({
chat: Object.assign(Object.assign({}, chat.dataValues), { contactIds: [purchaser.id] }),
@ -77,15 +82,7 @@ function purchaseFromOriginalSender(payload, chat, purchaser) {
const ogmsg = yield models_1.models.Message.findOne({ where: { chatId: chat.id, mediaToken: mt } });
// purchase it from creator (send "purchase")
const msg = { amount, mediaToken: mt };
console.log("GO AHEARD AND BUY!!! from:", ogmsg.sender, {
chat: Object.assign(Object.assign({}, chat.dataValues), { contactIds: [ogmsg.sender] }),
sender: Object.assign(Object.assign({}, owner.dataValues), purchaser && purchaser.alias && { alias: purchaser.alias }),
type: constants.message_types.purchase,
message: msg,
amount: amount,
success: () => { },
failure: () => { }
});
console.log("GO AHEARD AND BUY!!!");
send_1.sendMessage({
chat: Object.assign(Object.assign({}, chat.dataValues), { contactIds: [ogmsg.sender] }),
sender: Object.assign(Object.assign({}, owner.dataValues), purchaser && purchaser.alias && { alias: purchaser.alias }),
@ -128,7 +125,7 @@ function sendFinalMemeIfFirstPurchaser(payload, chat, sender) {
sender: Object.assign(Object.assign({}, owner.dataValues), sender && sender.alias && { alias: sender.alias }),
chat: Object.assign(Object.assign({}, chat.dataValues), { contactIds: [ogPurchaseMessage.sender] }),
type: msgtypes.purchase_accept,
message: Object.assign(Object.assign({}, termsAndKey), { mediaType: typ }),
message: Object.assign(Object.assign({}, termsAndKey), { mediaType: typ, originalMuid: muid }),
success: () => { },
receive: () => { }
});
@ -208,6 +205,7 @@ function downloadAndUploadAndSaveReturningTermsAndKey(payload, chat, sender, inj
sender: sender.id,
createdAt: date,
originalMuid: ogmuid,
mediaType: typ,
});
return { mediaTerms, mediaKey: encKey };
}

2
dist/api/network/modify.js.map

File diff suppressed because one or more lines are too long

2
dist/api/utils/setup.js

@ -44,7 +44,9 @@ function setVersion() {
}
function migrate() {
return __awaiter(this, void 0, void 0, function* () {
addTableColumn('sphinx_media_keys', 'media_type');
addTableColumn('sphinx_media_keys', 'original_muid');
addTableColumn('sphinx_messages', 'original_muid');
addTableColumn('sphinx_messages', 'uuid');
addTableColumn('sphinx_messages', 'reply_uuid');
addTableColumn('sphinx_media_keys', 'sender', 'BIGINT');

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

@ -1 +1 @@
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../api/utils/setup.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2CAA2C;AAC3C,sCAA2C;AAC3C,iDAAoC;AACpC,iCAAgC;AAChC,sCAAqC;AACrC,gDAAwC;AACxC,8CAA0D;AAE1D,MAAM,YAAY,GAAG,CAAC,CAAA;AAEtB,MAAM,aAAa,GAAG,GAAS,EAAE;IAC/B,OAAO,CA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