Merge pull request #941 from h3poteto/iss-940

closes #940 Update megalodon for User Agent and add User Agent in streaming
This commit is contained in:
AkiraFukushima 2019-06-12 23:20:24 +09:00 committed by GitHub
commit 0793a50a62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

6
package-lock.json generated
View File

@ -13242,9 +13242,9 @@
"dev": true
},
"megalodon": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/megalodon/-/megalodon-0.7.2.tgz",
"integrity": "sha512-4engsYXY9ptpFD6K4oO0nENbuM6yqExhQtC/4OHMPeCz/jOSEULo4TSH2bfDSQdM0OrxY7O8oTekteKPxKQ29Q==",
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/megalodon/-/megalodon-0.7.3.tgz",
"integrity": "sha512-n9gg8H7YhvqRW3fS0dBNb1iXyIl4PnNIYIyPo85s8zLI7Vk5pUH7DJaCysZoQuj47GLR08topPv/z/ZT5MkTpw==",
"requires": {
"@types/oauth": "0.9.1",
"@types/request": "2.48.1",

View File

@ -173,7 +173,7 @@
"i18next": "^12.1.0",
"i18next-sync-fs-backend": "^1.1.0",
"lodash": "^4.17.11",
"megalodon": "0.7.2",
"megalodon": "0.7.3",
"moment": "^2.21.0",
"mousetrap": "^1.6.2",
"nedb": "^1.8.0",

View File

@ -7,7 +7,7 @@ export default class Streaming {
private listener: StreamListener | null
constructor(account: LocalAccount) {
this.client = new Mastodon(account.accessToken!, account.baseURL + '/api/v1')
this.client = new Mastodon(account.accessToken!, account.baseURL + '/api/v1', 'Whalebird')
this.listener = null
}