@evanp/activitypub-bot 0.36.0 → 0.36.1

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.
@@ -118,9 +118,13 @@ export class ActivityPubClient {
118
118
  const headers = {
119
119
  accept: ActivityPubClient.#accept,
120
120
  date,
121
- 'user-agent': ActivityPubClient.#userAgent,
122
- 'if-modified-since': cached?.lastModified?.toUTCString(),
123
- 'if-none-match': cached?.etag
121
+ 'user-agent': ActivityPubClient.#userAgent
122
+ }
123
+ if (cached?.lastModified) {
124
+ headers['if-modified-since'] = cached.lastModified.toUTCString()
125
+ }
126
+ if (cached?.etag) {
127
+ headers['if-none-match'] = cached.etag
124
128
  }
125
129
  this.#logger.debug({ headers }, 'Sending headers')
126
130
  const method = 'GET'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evanp/activitypub-bot",
3
- "version": "0.36.0",
3
+ "version": "0.36.1",
4
4
  "description": "server-side ActivityPub bot framework",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",