Merge pull request #4320 from annando/self-like

It is now possible again to like yourself
This commit is contained in:
Hypolite Petovan 2018-01-24 02:02:47 -05:00 committed by GitHub
commit 1f3acd00f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 8 deletions

View File

@ -84,8 +84,7 @@ class Post extends BaseObject
}
// You can always comment on Diaspora and OStatus items
// The empty network can happen with your local (self) contact
if (in_array($item['network'], ['', NETWORK_OSTATUS, NETWORK_DIASPORA]) && (local_user() == $item['uid'])) {
if (in_array($item['network'], [NETWORK_OSTATUS, NETWORK_DIASPORA]) && (local_user() == $item['uid'])) {
$item['writable'] = true;
}
@ -296,12 +295,6 @@ class Post extends BaseObject
if ($shareable) {
$buttons['share'] = [t('Share this'), t('share')];
}
// If a contact isn't writable, we cannot send a like or dislike to it
if (!$item['writable']) {
unset($buttons["like"]);
unset($buttons["dislike"]);
}
}
$comment = $this->getCommentBox($indent);