You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
473 B
18 lines
473 B
import * as path from 'path'
|
|
|
|
const constants = require(path.join(__dirname,'../../config/constants.json'))
|
|
const msgtypes = constants.message_types
|
|
|
|
export function modifyPayload(payload) {
|
|
if(payload.type===msgtypes.attachment) {
|
|
console.log("MODIFY, ", payload)
|
|
// download image from mediaToken
|
|
// decrypt key
|
|
// decrypt image
|
|
// new key, re-encrypt, re-upload
|
|
// new payload
|
|
|
|
// how to link w og msg? ogMediaToken?
|
|
}
|
|
return payload
|
|
}
|
|
|