mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Update dependencies
This commit is contained in:
parent
9d94e5d7b9
commit
bdd428a6d9
33 changed files with 347 additions and 343 deletions
|
@ -56,9 +56,9 @@ function inboxController (req: express.Request, res: express.Response) {
|
|||
const rootActivity: RootActivity = req.body
|
||||
let activities: Activity[]
|
||||
|
||||
if ([ 'Collection', 'CollectionPage' ].indexOf(rootActivity.type) !== -1) {
|
||||
if ([ 'Collection', 'CollectionPage' ].includes(rootActivity.type)) {
|
||||
activities = (rootActivity as ActivityPubCollection).items
|
||||
} else if ([ 'OrderedCollection', 'OrderedCollectionPage' ].indexOf(rootActivity.type) !== -1) {
|
||||
} else if ([ 'OrderedCollection', 'OrderedCollectionPage' ].includes(rootActivity.type)) {
|
||||
activities = (rootActivity as ActivityPubOrderedCollection<Activity>).orderedItems
|
||||
} else {
|
||||
activities = [ rootActivity as Activity ]
|
||||
|
|
|
@ -60,7 +60,7 @@ function searchVideoChannels (req: express.Request, res: express.Response) {
|
|||
|
||||
// Handle strings like @toto@example.com
|
||||
if (parts.length === 3 && parts[0].length === 0) parts.shift()
|
||||
const isWebfingerSearch = parts.length === 2 && parts.every(p => p && p.indexOf(' ') === -1)
|
||||
const isWebfingerSearch = parts.length === 2 && parts.every(p => p && !p.includes(' '))
|
||||
|
||||
if (isURISearch || isWebfingerSearch) return searchVideoChannelURI(search, isWebfingerSearch, res)
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ function serveServerTranslations (req: express.Request, res: express.Response) {
|
|||
const locale = req.params.locale
|
||||
const file = req.params.file
|
||||
|
||||
if (is18nLocale(locale) && LOCALE_FILES.indexOf(file) !== -1) {
|
||||
if (is18nLocale(locale) && LOCALE_FILES.includes(file)) {
|
||||
const completeLocale = getCompleteLocale(locale)
|
||||
const completeFileLocale = buildFileLocale(completeLocale)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue