Merge pull request #4593 from annando/fix-ostatus

OStatus: Fixed communication issues with deleted contacts
This commit is contained in:
Hypolite Petovan 2018-03-14 18:46:21 -04:00 committed by GitHub
commit 65b0159282
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 110 additions and 122 deletions

View file

@ -445,7 +445,7 @@ These Fields are not added below (yet). They are here to for bug search.
return "`item`.`author-id`, `item`.`author-link`, `item`.`author-name`, `item`.`author-avatar`,
`item`.`owner-id`, `item`.`owner-link`, `item`.`owner-name`, `item`.`owner-avatar`,
`item`.`contact-id`, `item`.`uid`, `item`.`id`, `item`.`parent`,
`item`.`uri`, `item`.`thr-parent`, `item`.`parent-uri`,
`item`.`uri`, `item`.`thr-parent`, `item`.`parent-uri`, `item`.`content-warning`,
`item`.`commented`, `item`.`created`, `item`.`edited`, `item`.`received`,
`item`.`verb`, `item`.`object-type`, `item`.`postopts`, `item`.`plink`,
`item`.`guid`, `item`.`wall`, `item`.`private`, `item`.`starred`,

View file

@ -290,7 +290,7 @@ function subscribe_to_hub($url, $importer, $contact, $hubmode = 'subscribe') {
return;
}
$push_url = Config::get('system','url') . '/pubsub/' . $r[0]['nickname'] . '/' . $contact['id'];
$push_url = System::baseUrl() . '/pubsub/' . $r[0]['nickname'] . '/' . $contact['id'];
// Use a single verify token, even if multiple hubs
$verify_token = ((strlen($contact['hub-verify'])) ? $contact['hub-verify'] : random_string());

View file

@ -1182,6 +1182,11 @@ function put_item_in_cache(&$item, $update = false)
// I'm not sure if we should store it permanently, so we save the old value.
$body = $item["body"];
// Add the content warning
if (!empty($item['content-warning'])) {
$item["body"] = $item['content-warning'] . '[spoiler]' . $item["body"] . '[/spoiler]';
}
$a = get_app();
redir_private_images($a, $item);