Skip to content

Commit

Permalink
fix: add uid to allow alfred knowledge
Browse files Browse the repository at this point in the history
  • Loading branch information
Avivbens committed Jun 9, 2024
1 parent 2f89c69 commit 7b09038
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"test": "jest"
},
"dependencies": {
"fast-alfred": "^2.0.0",
"fast-alfred": "^2.1.1",
"fuse.js": "^7.0.0",
"libphonenumber-js": "^1.11.2",
"node-mac-contacts": "^1.7.2"
Expand Down Expand Up @@ -82,4 +82,4 @@
"publishConfig": {
"registry": "https://registry.npmjs.org/"
}
}
}
6 changes: 4 additions & 2 deletions src/main/contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ import { searchContacts } from '@services/search.service'
const phoneSubtitle = phoneNumbers.length ? `Phone: ${phoneNumbers[0]}` : ''

const subtitle = [phoneSubtitle, emailSubtitle].filter(Boolean).join(' | ')
const arg = JSON.stringify(payload)

return {
title: `${firstName} ${lastName}`,
subtitle,
arg: JSON.stringify(payload),
}
arg,
uid: arg,
} satisfies AlfredScriptFilter['items'][number]
})
.filter(({ subtitle }) => subtitle)

Expand Down

0 comments on commit 7b09038

Please sign in to comment.