mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2026-09-03 20:53:09 -05:00
Fix detecting public/unlisted privacy
This commit is contained in:
@@ -171,6 +171,7 @@ describe('Test video privacy', function () {
|
|||||||
const video = await server.videos.get({ id })
|
const video = await server.videos.get({ id })
|
||||||
|
|
||||||
expect(video.name).to.equal('unlisted video')
|
expect(video.name).to.equal('unlisted video')
|
||||||
|
expect(video.privacy.id).to.equal(VideoPrivacy.UNLISTED)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export function getAPPublicValue () {
|
|||||||
export function hasAPPublic (collection: string[] | string) {
|
export function hasAPPublic (collection: string[] | string) {
|
||||||
const publicValue = getAPPublicValue()
|
const publicValue = getAPPublicValue()
|
||||||
|
|
||||||
return arrayify(collection).some(f => f === 'as:Public' || publicValue)
|
return arrayify(collection).some(f => f === 'as:Public' || f === publicValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user