dms have a different license

merge-requests/30/head
Bob Mottram 2023-04-28 13:38:21 +01:00
parent 51b96f5313
commit ec821c7742
2 changed files with 7 additions and 3 deletions

View File

@ -710,7 +710,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.system_language, self.server.system_language,
conversation_id, conversation_id,
self.server.low_bandwidth, self.server.low_bandwidth,
self.server.content_license_url, self.server.dm_license_url,
self.server.content_license_url, '', self.server.content_license_url, '',
languages_understood, False, languages_understood, False,
self.server.translate, buy_url) self.server.translate, buy_url)
@ -21619,6 +21619,7 @@ class PubServer(BaseHTTPRequestHandler):
if fields.get('replychatmsg'): if fields.get('replychatmsg'):
reply_is_chat = fields['replychatmsg'] reply_is_chat = fields['replychatmsg']
dm_license_url = self.server.dm_license_url
media_license_url = content_license_url media_license_url = content_license_url
if fields.get('mediaLicense'): if fields.get('mediaLicense'):
media_license_url = fields['mediaLicense'] media_license_url = fields['mediaLicense']
@ -21659,7 +21660,7 @@ class PubServer(BaseHTTPRequestHandler):
fields['languagesDropdown'], fields['languagesDropdown'],
conversation_id, conversation_id,
self.server.low_bandwidth, self.server.low_bandwidth,
content_license_url, dm_license_url,
media_license_url, media_license_url,
media_creator, media_creator,
languages_understood, languages_understood,
@ -21792,7 +21793,7 @@ class PubServer(BaseHTTPRequestHandler):
fields['languagesDropdown'], fields['languagesDropdown'],
conversation_id, conversation_id,
self.server.low_bandwidth, self.server.low_bandwidth,
self.server.content_license_url, self.server.dm_license_url,
media_license_url, media_license_url,
media_creator, media_creator,
languages_understood, languages_understood,
@ -23500,6 +23501,7 @@ def run_daemon(max_hashtags: int,
if not content_license_url: if not content_license_url:
content_license_url = 'https://creativecommons.org/licenses/by-nc/4.0' content_license_url = 'https://creativecommons.org/licenses/by-nc/4.0'
httpd.content_license_url = content_license_url httpd.content_license_url = content_license_url
httpd.dm_license_url = ''
# fitness metrics # fitness metrics
fitness_filename = base_dir + '/accounts/fitness.json' fitness_filename = base_dir + '/accounts/fitness.json'

View File

@ -1138,6 +1138,8 @@ def _attach_post_license(post_json_object: {},
represent license information on ActivityPub posts, so this might represent license information on ActivityPub posts, so this might
need to change if such a consensus appears. need to change if such a consensus appears.
""" """
if not content_license_url:
return
post_json_object['attachment'].append({ post_json_object['attachment'].append({
"type": "PropertyValue", "type": "PropertyValue",
"name": "license", "name": "license",