mirror of https://gitlab.com/bashrc2/epicyon
Single quotes
parent
f521dfd109
commit
a58cd1f62f
96
happening.py
96
happening.py
|
@ -998,73 +998,73 @@ def _dav_store_event(base_dir: str, nickname: str, domain: str,
|
||||||
'\" class=\"u-url mention\" tabindex="10">@<span>' + nickname + \
|
'\" class=\"u-url mention\" tabindex="10">@<span>' + nickname + \
|
||||||
'</span></a></span>' + remove_html(description) + '</p>'
|
'</span></a></span>' + remove_html(description) + '</p>'
|
||||||
event_json = {
|
event_json = {
|
||||||
"@context": post_context,
|
'@context': post_context,
|
||||||
"id": post_id + "/activity",
|
'id': post_id + '/activity',
|
||||||
"type": "Create",
|
'type': 'Create',
|
||||||
"actor": actor,
|
'actor': actor,
|
||||||
"published": published,
|
'published': published,
|
||||||
"to": [actor],
|
'to': [actor],
|
||||||
"cc": [],
|
'cc': [],
|
||||||
"object": {
|
'object': {
|
||||||
"id": post_id,
|
'id': post_id,
|
||||||
"conversation": post_id,
|
'conversation': post_id,
|
||||||
"context": post_id,
|
'context': post_id,
|
||||||
"type": "Note",
|
'type': "Note",
|
||||||
"summary": None,
|
'summary': None,
|
||||||
"inReplyTo": None,
|
'inReplyTo': None,
|
||||||
"published": published,
|
'published': published,
|
||||||
"url": actor + "/" + status_number,
|
'url': actor + '/' + status_number,
|
||||||
"attributedTo": actor,
|
'attributedTo': actor,
|
||||||
"to": [actor],
|
'to': [actor],
|
||||||
"cc": [],
|
'cc': [],
|
||||||
"sensitive": False,
|
'sensitive': False,
|
||||||
"atomUri": post_id,
|
'atomUri': post_id,
|
||||||
"inReplyToAtomUri": None,
|
'inReplyToAtomUri': None,
|
||||||
"commentsEnabled": False,
|
'commentsEnabled': False,
|
||||||
"rejectReplies": True,
|
'rejectReplies': True,
|
||||||
"mediaType": "text/html",
|
'mediaType': 'text/html',
|
||||||
"content": content,
|
'content': content,
|
||||||
"contentMap": {
|
'contentMap': {
|
||||||
system_language: content
|
system_language: content
|
||||||
},
|
},
|
||||||
"attachment": [],
|
'attachment': [],
|
||||||
"tag": [
|
'tag': [
|
||||||
{
|
{
|
||||||
"href": actor2,
|
'href': actor2,
|
||||||
"name": "@" + nickname + "@" + domain,
|
'name': '@' + nickname + '@' + domain,
|
||||||
"type": "Mention"
|
'type': 'Mention'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"@context": [
|
'@context': [
|
||||||
'https://www.w3.org/ns/activitystreams',
|
'https://www.w3.org/ns/activitystreams',
|
||||||
'https://w3id.org/security/v1'
|
'https://w3id.org/security/v1'
|
||||||
],
|
],
|
||||||
"type": "Event",
|
'type': 'Event',
|
||||||
"name": content,
|
'name': content,
|
||||||
"startTime": start_time,
|
'startTime': start_time,
|
||||||
"endTime": end_time
|
'endTime': end_time
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"replies": {
|
'replies': {
|
||||||
"id": post_id + "/replies",
|
'id': post_id + '/replies',
|
||||||
"type": "Collection",
|
'type': 'Collection',
|
||||||
"first": {
|
'first': {
|
||||||
"type": "CollectionPage",
|
'type': 'CollectionPage',
|
||||||
"next": next_str,
|
'next': next_str,
|
||||||
"partOf": post_id + "/replies",
|
'partOf': post_id + '/replies',
|
||||||
"items": []
|
'items': []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if location:
|
if location:
|
||||||
event_json['object']['tag'].append({
|
event_json['object']['tag'].append({
|
||||||
"@context": [
|
'@context': [
|
||||||
'https://www.w3.org/ns/activitystreams',
|
'https://www.w3.org/ns/activitystreams',
|
||||||
'https://w3id.org/security/v1'
|
'https://w3id.org/security/v1'
|
||||||
],
|
],
|
||||||
"type": "Place",
|
'type': 'Place',
|
||||||
"name": location
|
'name': location
|
||||||
})
|
})
|
||||||
event_json['object']['location'] = {
|
event_json['object']['location'] = {
|
||||||
'type': 'Place',
|
'type': 'Place',
|
||||||
|
|
Loading…
Reference in New Issue