Replace youtube on new posts

merge-requests/6/head
Bob Mottram 2020-01-15 11:06:40 +00:00
parent 58dd8b62c3
commit 5193d850e7
1 changed files with 3 additions and 0 deletions

View File

@ -17,6 +17,7 @@ from utils import getDomainFromActor
from blocking import isBlockedDomain from blocking import isBlockedDomain
from blocking import outboxBlock from blocking import outboxBlock
from blocking import outboxUndoBlock from blocking import outboxUndoBlock
from media import replaceYouTube
from media import getMediaPath from media import getMediaPath
from media import createMediaDirs from media import createMediaDirs
from inbox import inboxUpdateIndex from inbox import inboxUpdateIndex
@ -89,6 +90,8 @@ def postMessageToOutbox(messageJson: {},postToNickname: str, \
if debug: if debug:
print('DEBUG: domain is blocked: '+messageJson['actor']) print('DEBUG: domain is blocked: '+messageJson['actor'])
return False return False
# replace youtube, so that google gets less tracking data
replaceYouTube(messageJson)
# https://www.w3.org/TR/activitypub/#create-activity-outbox # https://www.w3.org/TR/activitypub/#create-activity-outbox
messageJson['object']['attributedTo']=messageJson['actor'] messageJson['object']['attributedTo']=messageJson['actor']
if messageJson['object'].get('attachment'): if messageJson['object'].get('attachment'):