mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2025-09-08 23:18:43 +00:00
Merge pull request #8 from PR0M3TH3AN/unstable
added block filter for link path to blacklisted npub content
This commit is contained in:
@@ -1350,7 +1350,7 @@ class bitvidApp {
|
|||||||
* Helper to open a video by event ID (like ?v=...).
|
* Helper to open a video by event ID (like ?v=...).
|
||||||
*/
|
*/
|
||||||
async playVideoByEventId(eventId) {
|
async playVideoByEventId(eventId) {
|
||||||
// First, check if this event is blacklisted
|
// First, check if this event is blacklisted by event ID
|
||||||
if (this.blacklistedEventIds.has(eventId)) {
|
if (this.blacklistedEventIds.has(eventId)) {
|
||||||
this.showError("This content has been removed or is not allowed.");
|
this.showError("This content has been removed or is not allowed.");
|
||||||
return;
|
return;
|
||||||
@@ -1369,6 +1369,13 @@ class bitvidApp {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// **Check if video’s author is blacklisted**
|
||||||
|
const authorNpub = this.safeEncodeNpub(video.pubkey) || video.pubkey;
|
||||||
|
if (initialBlacklist.includes(authorNpub)) {
|
||||||
|
this.showError("This content has been removed or is not allowed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 4) Decrypt magnet if private & owned
|
// 4) Decrypt magnet if private & owned
|
||||||
if (
|
if (
|
||||||
video.isPrivate &&
|
video.isPrivate &&
|
||||||
|
Reference in New Issue
Block a user