@evanp/activitypub-bot 0.30.1 → 0.30.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,7 @@ router.get('/actor', async (req, res) => {
15
15
  const publicKeyPem = await keyStorage.getPublicKey(null)
16
16
  const acct = formatter.acct()
17
17
  const webfinger = acct.slice(5)
18
+ const [username] = webfinger.split('@', 1)
18
19
  const server = await as2.import({
19
20
  '@context': [
20
21
  'https://www.w3.org/ns/activitystreams',
@@ -24,6 +25,7 @@ router.get('/actor', async (req, res) => {
24
25
  id: formatter.format({ server: true }),
25
26
  type: 'Service',
26
27
  to: 'as:Public',
28
+ preferredUsername: username,
27
29
  alsoKnownAs: acct,
28
30
  webfinger,
29
31
  publicKey: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evanp/activitypub-bot",
3
- "version": "0.30.1",
3
+ "version": "0.30.2",
4
4
  "description": "server-side ActivityPub bot framework",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",