mirror of https://gitlab.com/bashrc2/epicyon
Add address to location
parent
bf046b4d3e
commit
d0bdd7a55c
22
posts.py
22
posts.py
|
@ -1398,10 +1398,13 @@ def _create_post_s2s(base_dir: str, nickname: str, domain: str, port: int,
|
||||||
'type': 'Place',
|
'type': 'Place',
|
||||||
'name': location['name']
|
'name': location['name']
|
||||||
}
|
}
|
||||||
if location.get('url'):
|
if location.get('address'):
|
||||||
if isinstance(location['url'], str):
|
if isinstance(location['address'], str):
|
||||||
if resembles_url(location['url']):
|
new_post['object']['location']['address'] = location['address']
|
||||||
new_post['object']['location']['url'] = location['url']
|
if location.get('url'):
|
||||||
|
if isinstance(location['url'], str):
|
||||||
|
if resembles_url(location['url']):
|
||||||
|
new_post['object']['location']['url'] = location['url']
|
||||||
if attach_image_filename:
|
if attach_image_filename:
|
||||||
new_post['object'] = \
|
new_post['object'] = \
|
||||||
attach_media(base_dir, http_prefix, nickname, domain, port,
|
attach_media(base_dir, http_prefix, nickname, domain, port,
|
||||||
|
@ -1533,10 +1536,13 @@ def _create_post_c2s(base_dir: str, nickname: str, domain: str, port: int,
|
||||||
'type': 'Place',
|
'type': 'Place',
|
||||||
'name': location['name']
|
'name': location['name']
|
||||||
}
|
}
|
||||||
if location.get('url'):
|
if location.get('address'):
|
||||||
if isinstance(location['url'], str):
|
if isinstance(location['address'], str):
|
||||||
if resembles_url(location['url']):
|
new_post['object']['location']['address'] = location['address']
|
||||||
new_post['object']['location']['url'] = location['url']
|
if location.get('url'):
|
||||||
|
if isinstance(location['url'], str):
|
||||||
|
if resembles_url(location['url']):
|
||||||
|
new_post['object']['location']['url'] = location['url']
|
||||||
|
|
||||||
if attach_image_filename:
|
if attach_image_filename:
|
||||||
new_post = \
|
new_post = \
|
||||||
|
|
Loading…
Reference in New Issue