diff --git a/src/ingestor.ts b/src/ingestor.ts index 453d4a64..7a6fdaae 100644 --- a/src/ingestor.ts +++ b/src/ingestor.ts @@ -122,7 +122,7 @@ export default async function ingestor(req) { type: message.type, app: kebabCase(message.app || '') }; - + if (type === 'alias') payload = { alias: message.alias }; if (type === 'statement') payload = { about: message.about, statement: message.statement }; if (type === 'delete-proposal') payload = { proposal: message.proposal }; if (type === 'update-proposal') { diff --git a/src/writer/alias.ts b/src/writer/alias.ts index 5741a21f..ed85c049 100644 --- a/src/writer/alias.ts +++ b/src/writer/alias.ts @@ -18,11 +18,12 @@ export async function verify(message): Promise { } export async function action(message, ipfs, receipt, id): Promise { + const msg = jsonParse(message.msg); const params = { id, ipfs, - address: getAddress(message.from), - alias: getAddress(message.alias), + address: getAddress(message.address), + alias: getAddress(msg.payload.alias), created: message.timestamp }; await db.queryAsync('INSERT IGNORE INTO aliases SET ?', params);