Send dm on sigit sign/complete #230

Open
enes wants to merge 14 commits from 92-send-completion-dm into staging
Showing only changes of commit 1474fafde7 - Show all commits

View File

@ -633,7 +633,8 @@ export const SignPage = () => {
)
}
} else {
// Notify the creator and the next signer (/sign).
// Notify the creator and
// the next signer (/sign).
try {
await sendPrivateDirectMessage(
`Sigit signed by ${usersNpub}, visit ${window.location.origin}/#/sign/${id}`,
@ -648,12 +649,12 @@ export const SignPage = () => {
// No need to notify creator twice, skipping
const currentSignerIndex = signers.indexOf(usersNpub)
const nextSigner = signers[currentSignerIndex + 1]
const nextSigner = npubToHex(signers[currentSignerIndex + 1])
if (nextSigner !== submittedBy) {
try {
await sendPrivateDirectMessage(
`You're the next signer, visit ${window.location.origin}/#/sign/${id}`,
npubToHex(nextSigner)!
nextSigner!
)
} catch (error) {
if (error instanceof SendDMError) {