When start and end time are the same

main
Bob Mottram 2025-05-20 10:21:35 +01:00
parent 91d8e83e2c
commit fc3b528e78
2 changed files with 7 additions and 3 deletions

View File

@ -389,9 +389,13 @@ def get_event_time_span_from_post(post_json_object: {}) -> str:
return '<time datetime="' + start_time + '">' + \
start_date_str + ' ' + start_time_str + '</time>'
if start_date_str == end_date_str:
if end_time_str != start_time_str:
return '<time datetime="' + start_time + '">' + \
start_date_str + ' ' + start_time_str + '</time> - ' + \
'<time datetime="' + end_time + '">' + \
end_time_str + '</time>'
return '<time datetime="' + start_time + '">' + \
start_date_str + ' ' + start_time_str + '</time> - ' + \
'<time datetime="' + end_time + '">' + end_time_str + '</time>'
start_date_str + ' ' + start_time_str + '</time>'
return '<time datetime="' + start_time + '">' + \
start_date_str + ' ' + start_time_str + '</time> - ' + \
'<time datetime="' + end_time + '">' + \

View File

@ -23,8 +23,8 @@ def meta_data_node_info(base_dir: str,
instance_description: str) -> {}:
""" /nodeinfo/2.2 endpoint
Also see https://socialhub.activitypub.rocks/t/
https://github.com/jhass/nodeinfo/blob/main/schemas/2.2/example.json
fep-f1d5-nodeinfo-in-fediverse-software/1190/4
https://github.com/jhass/nodeinfo/blob/main/schemas/2.2/example.json
Note that there are security considerations with this. If an adversary
sees a lot of accounts and "local" posts then the instance may be