Skip to content

Commit

Permalink
add DAO URL and proposal title+description to telegram webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Oct 15, 2024
1 parent 2a0262a commit 85f6d1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/webhooks/webhooks/telegram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,16 @@ export const makeProposalCreated: WebhookMaker<WasmStateEvent> = (
const [, proposalNum] = dbKeyToKeys(event.key, [false, true])
const proposalId = `${proposalModule.prefix}${proposalNum}`

const daoUrl = config.daoDaoBase + `/dao/${daoAddress}`

return {
apiKey: config.telegramNotifierApiKey,
daoName: daoConfig.name,
proposalTitle: event.valueJson.title,
proposalDescription: event.valueJson.description,
proposalId,
url: config.daoDaoBase + `/dao/${daoAddress}/proposals/${proposalId}`,
daoUrl,
url: daoUrl + `/proposals/${proposalId}`,
}
},
})

0 comments on commit 85f6d1c

Please sign in to comment.