ActivityPub-federated video streaming platform using P2P directly in your web browser
Relax federation logs
Chocobozzz766f2cb76a56
diff --git a/server/core/lib/activitypub/share.ts b/server/core/lib/activitypub/share.tsindex b62b67574e..5edc2c7086 100644--- a/server/core/lib/activitypub/share.ts+++ b/server/core/lib/activitypub/share.ts@@ -9,6 +9,7 @@ import { fetchAP, getAPId } from './activity.js'import { getOrCreateAPActor } from './actors/index.js'import { sendUndoAnnounce, sendVideoAnnounce } from './send/index.js'import { checkUrlsSameHost, getLocalVideoAnnounceActivityPubUrl } from './url.js'+import { HttpStatusCode } from '@peertube/peertube-models'const lTags = loggerTagsFactory('share')@@ -32,7 +33,12 @@ export async function addVideoShares (shareUrls: string[], video: MVideoId) {try {await addVideoShare(shareUrl, video)} catch (err) {- logger.warn('Cannot add share %s.', shareUrl, { err })+ if (err.statusCode === HttpStatusCode.NOT_FOUND_404 || err.statusCode === HttpStatusCode.GONE_410) {+ logger.debug(`Cannot add share ${shareUrl} that does not exist anymore`, { err })+ return+ }++ logger.info(`Cannot add share ${shareUrl}`, { err })}}, { concurrency: CRAWL_REQUEST_CONCURRENCY })}diff --git a/server/core/lib/activitypub/video-comments.ts b/server/core/lib/activitypub/video-comments.tsindex 067f8e911a..c481af5553 100644--- a/server/core/lib/activitypub/video-comments.ts+++ b/server/core/lib/activitypub/video-comments.ts@@ -1,4 +1,4 @@-import { VideoCommentPolicy } from '@peertube/peertube-models'+import { HttpStatusCode, VideoCommentPolicy } from '@peertube/peertube-models'import Bluebird from 'bluebird'import { sanitizeAndCheckVideoCommentObject } from '../../helpers/custom-validators/activitypub/video-comments.js'import { logger } from '../../helpers/logger.js'@@ -34,7 +34,12 @@ export async function addVideoComments (commentUrls: string[]) {try {await resolveThread({ url: commentUrl, isVideo: false })} catch (err) {- logger.warn('Cannot resolve thread %s.', commentUrl, { err })+ if (err.statusCode === HttpStatusCode.NOT_FOUND_404 || err.statusCode === HttpStatusCode.GONE_410) {+ logger.debug(`Cannot resolve thread ${commentUrl} that does not exist anymore`, { err })+ return+ }++ logger.info(`Cannot resolve thread ${commentUrl}`, { err })}}, { concurrency: CRAWL_REQUEST_CONCURRENCY })}