diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-15 09:46:46 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-15 09:47:19 +0100 |
commit | 7006bc6378eb0d480bc5b60f2c18876f0bb2a97d (patch) | |
tree | 1d914b217a7374ed6315ef2f4d38e921689d3705 /server/helpers/requests.ts | |
parent | 304016c52ba275a293a2c8ee3287e569b398dc68 (diff) | |
download | PeerTube-7006bc6378eb0d480bc5b60f2c18876f0bb2a97d.tar.gz PeerTube-7006bc6378eb0d480bc5b60f2c18876f0bb2a97d.tar.zst PeerTube-7006bc6378eb0d480bc5b60f2c18876f0bb2a97d.zip |
Fix actor followers/following counts
Diffstat (limited to 'server/helpers/requests.ts')
-rw-r--r-- | server/helpers/requests.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/helpers/requests.ts b/server/helpers/requests.ts index ce185a2c0..ac3559c58 100644 --- a/server/helpers/requests.ts +++ b/server/helpers/requests.ts | |||
@@ -1,9 +1,13 @@ | |||
1 | import * as Promise from 'bluebird' | 1 | import * as Promise from 'bluebird' |
2 | import { createWriteStream } from 'fs' | 2 | import { createWriteStream } from 'fs' |
3 | import { RequestResponse } from 'request' | ||
3 | import * as request from 'request' | 4 | import * as request from 'request' |
4 | import { ACTIVITY_PUB } from '../initializers' | 5 | import { ACTIVITY_PUB } from '../initializers' |
6 | import Bluebird = require('bluebird') | ||
5 | 7 | ||
6 | function doRequest (requestOptions: request.CoreOptions & request.UriOptions & { activityPub?: boolean }) { | 8 | function doRequest ( |
9 | requestOptions: request.CoreOptions & request.UriOptions & { activityPub?: boolean } | ||
10 | ): Bluebird<{ response: RequestResponse, body: any }> { | ||
7 | if (requestOptions.activityPub === true) { | 11 | if (requestOptions.activityPub === true) { |
8 | if (!Array.isArray(requestOptions.headers)) requestOptions.headers = {} | 12 | if (!Array.isArray(requestOptions.headers)) requestOptions.headers = {} |
9 | requestOptions.headers['accept'] = ACTIVITY_PUB.ACCEPT_HEADER | 13 | requestOptions.headers['accept'] = ACTIVITY_PUB.ACCEPT_HEADER |