-- ------------------------------------------
-- Friendica 2022.05-rc (Siberian Iris)
--- DB_UPDATE_VERSION 1468
+-- DB_UPDATE_VERSION 1469
-- ------------------------------------------
`post-content`.`target` AS `target`,
`post-content`.`resource-id` AS `resource-id`,
`post-user`.`contact-id` AS `contact-id`,
+ `contact`.`uri-id` AS `contact-uri-id`,
`contact`.`url` AS `contact-link`,
`contact`.`addr` AS `contact-addr`,
`contact`.`name` AS `contact-name`,
`contact`.`avatar-date` AS `avatar-date`,
`contact`.`thumb` AS `thumb`,
`post-user`.`author-id` AS `author-id`,
+ `author`.`uri-id` AS `author-uri-id`,
`author`.`url` AS `author-link`,
`author`.`addr` AS `author-addr`,
IF (`contact`.`url` = `author`.`url` AND `contact`.`name` != '', `contact`.`name`, `author`.`name`) AS `author-name`,
`author`.`hidden` AS `author-hidden`,
`author`.`updated` AS `author-updated`,
`author`.`gsid` AS `author-gsid`,
- `author`.`uri-id` AS `author-uri-id`,
`post-user`.`owner-id` AS `owner-id`,
+ `owner`.`uri-id` AS `owner-uri-id`,
`owner`.`url` AS `owner-link`,
`owner`.`addr` AS `owner-addr`,
IF (`contact`.`url` = `owner`.`url` AND `contact`.`name` != '', `contact`.`name`, `owner`.`name`) AS `owner-name`,
`owner`.`updated` AS `owner-updated`,
`owner`.`contact-type` AS `owner-contact-type`,
`post-user`.`causer-id` AS `causer-id`,
+ `causer`.`uri-id` AS `causer-uri-id`,
`causer`.`url` AS `causer-link`,
`causer`.`addr` AS `causer-addr`,
`causer`.`name` AS `causer-name`,
`post-content`.`target` AS `target`,
`post-content`.`resource-id` AS `resource-id`,
`post-thread-user`.`contact-id` AS `contact-id`,
+ `contact`.`uri-id` AS `contact-uri-id`,
`contact`.`url` AS `contact-link`,
`contact`.`addr` AS `contact-addr`,
`contact`.`name` AS `contact-name`,
`contact`.`avatar-date` AS `avatar-date`,
`contact`.`thumb` AS `thumb`,
`post-thread-user`.`author-id` AS `author-id`,
+ `author`.`uri-id` AS `author-uri-id`,
`author`.`url` AS `author-link`,
`author`.`addr` AS `author-addr`,
IF (`contact`.`url` = `author`.`url` AND `contact`.`name` != '', `contact`.`name`, `author`.`name`) AS `author-name`,
`author`.`hidden` AS `author-hidden`,
`author`.`updated` AS `author-updated`,
`author`.`gsid` AS `author-gsid`,
- `author`.`uri-id` AS `author-uri-id`,
`post-thread-user`.`owner-id` AS `owner-id`,
+ `owner`.`uri-id` AS `owner-uri-id`,
`owner`.`url` AS `owner-link`,
`owner`.`addr` AS `owner-addr`,
IF (`contact`.`url` = `owner`.`url` AND `contact`.`name` != '', `contact`.`name`, `owner`.`name`) AS `owner-name`,
`owner`.`updated` AS `owner-updated`,
`owner`.`contact-type` AS `owner-contact-type`,
`post-thread-user`.`causer-id` AS `causer-id`,
+ `causer`.`uri-id` AS `causer-uri-id`,
`causer`.`url` AS `causer-link`,
`causer`.`addr` AS `causer-addr`,
`causer`.`name` AS `causer-name`,
`post-content`.`target` AS `target`,
`post-content`.`resource-id` AS `resource-id`,
`post`.`author-id` AS `contact-id`,
+ `author`.`uri-id` AS `contact-uri-id`,
`author`.`url` AS `contact-link`,
`author`.`addr` AS `contact-addr`,
`author`.`name` AS `contact-name`,
`author`.`avatar-date` AS `avatar-date`,
`author`.`thumb` AS `thumb`,
`post`.`author-id` AS `author-id`,
+ `author`.`uri-id` AS `author-uri-id`,
`author`.`url` AS `author-link`,
`author`.`addr` AS `author-addr`,
`author`.`name` AS `author-name`,
`author`.`hidden` AS `author-hidden`,
`author`.`updated` AS `author-updated`,
`author`.`gsid` AS `author-gsid`,
- `author`.`uri-id` AS `author-uri-id`,
`post`.`owner-id` AS `owner-id`,
+ `owner`.`uri-id` AS `owner-uri-id`,
`owner`.`url` AS `owner-link`,
`owner`.`addr` AS `owner-addr`,
`owner`.`name` AS `owner-name`,
`owner`.`updated` AS `owner-updated`,
`owner`.`contact-type` AS `owner-contact-type`,
`post`.`causer-id` AS `causer-id`,
+ `causer`.`uri-id` AS `causer-uri-id`,
`causer`.`url` AS `causer-link`,
`causer`.`addr` AS `causer-addr`,
`causer`.`name` AS `causer-name`,
`post-content`.`target` AS `target`,
`post-content`.`resource-id` AS `resource-id`,
`post-thread`.`author-id` AS `contact-id`,
+ `author`.`uri-id` AS `contact-uri-id`,
`author`.`url` AS `contact-link`,
`author`.`addr` AS `contact-addr`,
`author`.`name` AS `contact-name`,
`author`.`avatar-date` AS `avatar-date`,
`author`.`thumb` AS `thumb`,
`post-thread`.`author-id` AS `author-id`,
+ `author`.`uri-id` AS `author-uri-id`,
`author`.`url` AS `author-link`,
`author`.`addr` AS `author-addr`,
`author`.`name` AS `author-name`,
`author`.`hidden` AS `author-hidden`,
`author`.`updated` AS `author-updated`,
`author`.`gsid` AS `author-gsid`,
- `author`.`uri-id` AS `author-uri-id`,
`post-thread`.`owner-id` AS `owner-id`,
+ `owner`.`uri-id` AS `owner-uri-id`,
`owner`.`url` AS `owner-link`,
`owner`.`addr` AS `owner-addr`,
`owner`.`name` AS `owner-name`,
`owner`.`updated` AS `owner-updated`,
`owner`.`contact-type` AS `owner-contact-type`,
`post-thread`.`causer-id` AS `causer-id`,
+ `causer`.`uri-id` AS `causer-uri-id`,
`causer`.`url` AS `causer-link`,
`causer`.`addr` AS `causer-addr`,
`causer`.`name` AS `causer-name`,
`fcontact`.`notify` AS `diaspora-notify`,
`fcontact`.`poll` AS `diaspora-poll`,
`fcontact`.`alias` AS `diaspora-alias`,
+ `fcontact`.`interacting_count` AS `diaspora-interacting_count`,
+ `fcontact`.`interacted_count` AS `diaspora-interacted_count`,
+ `fcontact`.`post_count` AS `diaspora-post_count`,
`apcontact`.`uuid` AS `ap-uuid`,
`apcontact`.`type` AS `ap-type`,
`apcontact`.`following` AS `ap-following`,
} catch (HTTPException $e) {
(new ModuleHTTPException())->rawContent($e);
}
- $page->logRuntime($this->config);
+ $page->logRuntime($this->config, 'runFrontend');
}
/**
$this->method = $method;
}
- public function logRuntime(IManageConfigValues $config)
+ public function logRuntime(IManageConfigValues $config, string $origin = '')
{
if (in_array($this->command, $config->get('system', 'runtime_ignore'))) {
return;
$runtime = number_format(microtime(true) - $this->timestamp, 3);
if ($runtime > $config->get('system', 'runtime_loglimit')) {
- Logger::debug('Runtime', ['method' => $this->method, 'command' => $this->command, 'runtime' => $runtime]);
+ Logger::debug('Runtime', ['method' => $this->method, 'command' => $this->command, 'runtime' => $runtime, 'origin' => $origin]);
}
}
*/
public static function exit()
{
- DI::page()->logRuntime(DI::config());
+ DI::page()->logRuntime(DI::config(), 'exit');
exit();
}
use Friendica\App\BaseURL;
use Friendica\BaseFactory;
use Friendica\Collection\Api\Mastodon\Fields;
-use Friendica\Model\APContact;
+use Friendica\Database\DBA;
use Friendica\Model\Contact;
-use Friendica\Model\FContact;
use Friendica\Network\HTTPException;
use Friendica\Profile\ProfileField\Repository\ProfileField as ProfileFieldRepository;
use ImagickException;
*/
public function createFromContactId(int $contactId, $uid = 0): \Friendica\Object\Api\Mastodon\Account
{
- $cdata = Contact::getPublicAndUserContactID($contactId, $uid);
- if (!empty($cdata)) {
- $publicContact = Contact::getById($cdata['public']);
- $userContact = Contact::getById($cdata['user']);
- } else {
- $publicContact = Contact::getById($contactId);
- $userContact = [];
+ $contact = Contact::getById($contactId, ['uri-id']);
+ if (empty($contact)) {
+ throw new HTTPException\NotFoundException('Contact ' . $contactId . ' not found');
}
+ return self::createFromUriId($contact['uri-id'], $uid);
+ }
- if (empty($publicContact)) {
- throw new HTTPException\NotFoundException('Contact ' . $contactId . ' not found');
+ /**
+ * @param int $contactUriId
+ * @param int $uid Public contact (=0) or owner user id
+ *
+ * @return \Friendica\Object\Api\Mastodon\Account
+ * @throws HTTPException\InternalServerErrorException
+ * @throws ImagickException|HTTPException\NotFoundException
+ */
+ public function createFromUriId(int $contactUriId, $uid = 0): \Friendica\Object\Api\Mastodon\Account
+ {
+ $contact = DBA::selectFirst('account-user-view', [], ['uri-id' => $contactUriId, 'uid' => [0, $uid]], ['order' => ['id' => true]]);
+ if (empty($contact)) {
+ throw new HTTPException\NotFoundException('Contact ' . $contactUriId . ' not found');
}
- $apcontact = APContact::getByURL($publicContact['url'], false);
- $fcontact = FContact::getByURL($publicContact['url'], false);
+ $fields = new Fields();
- $self_contact = Contact::selectFirst(['uid'], ['nurl' => $publicContact['nurl'], 'self' => true]);
- if (!empty($self_contact['uid'])) {
- $profileFields = $this->profileFieldRepo->selectPublicFieldsByUserId($self_contact['uid']);
- $fields = $this->mstdnFieldFactory->createFromProfileFields($profileFields);
- } else {
- $fields = new Fields();
+ if (Contact::isLocal($contact['url'])) {
+ $self_contact = Contact::selectFirst(['uid'], ['nurl' => $contact['nurl'], 'self' => true]);
+ if (!empty($self_contact['uid'])) {
+ $profileFields = $this->profileFieldRepo->selectPublicFieldsByUserId($self_contact['uid']);
+ $fields = $this->mstdnFieldFactory->createFromProfileFields($profileFields);
+ }
}
- return new \Friendica\Object\Api\Mastodon\Account($this->baseUrl, $publicContact, $fields, $apcontact, $userContact, $fcontact);
+ return new \Friendica\Object\Api\Mastodon\Account($this->baseUrl, $contact, $fields);
}
/**
*/
public function createFromUserId(int $userId): \Friendica\Object\Api\Mastodon\Account
{
- $publicContact = Contact::selectFirst([], ['uid' => $userId, 'self' => true]);
-
+ $contact = DBA::selectFirst('account-user-view', [], ['uid' => $userId, 'self' => true]);
$profileFields = $this->profileFieldRepo->selectPublicFieldsByUserId($userId);
$fields = $this->mstdnFieldFactory->createFromProfileFields($profileFields);
- $apContact = APContact::getByURL($publicContact['url'], false);
-
- return new \Friendica\Object\Api\Mastodon\Account($this->baseUrl, $publicContact, $fields, $apContact);
+ return new \Friendica\Object\Api\Mastodon\Account($this->baseUrl, $contact, $fields);
}
}
* @throws HTTPException\InternalServerErrorException
* @throws ImagickException|HTTPException\NotFoundException
*/
- public function createFromUriId(int $uriId, $uid = 0): \Friendica\Object\Api\Mastodon\Status
+ public function createFromUriId(int $uriId, $uid = 0, $item = []): \Friendica\Object\Api\Mastodon\Status
{
- $fields = ['uri-id', 'uid', 'author-id', 'author-link', 'starred', 'app', 'title', 'body', 'raw-body', 'content-warning', 'question-id',
- 'created', 'network', 'thr-parent-id', 'parent-author-id', 'language', 'uri', 'plink', 'private', 'vid', 'gravity', 'featured'];
+ $fields = ['uri-id', 'uid', 'author-id', 'author-uri-id', 'author-link', 'starred', 'app', 'title', 'body', 'raw-body', 'content-warning', 'question-id',
+ 'created', 'network', 'thr-parent-id', 'parent-author-id', 'language', 'uri', 'plink', 'private', 'vid', 'gravity', 'featured', 'has-media'];
$item = Post::selectFirst($fields, ['uri-id' => $uriId, 'uid' => [0, $uid]], ['order' => ['uid' => true]]);
if (!$item) {
$mail = DBA::selectFirst('mail', ['id'], ['uri-id' => $uriId, 'uid' => $uid]);
}
throw new HTTPException\NotFoundException('Item with URI ID ' . $uriId . ' not found' . ($uid ? ' for user ' . $uid : '.'));
}
-
- $account = $this->mstdnAccountFactory->createFromContactId($item['author-id']);
+ $account = $this->mstdnAccountFactory->createFromUriId($item['author-uri-id'], $uid);
+
+ $count_announce = Post::countPosts([
+ 'thr-parent-id' => $uriId,
+ 'gravity' => GRAVITY_ACTIVITY,
+ 'vid' => Verb::getID(Activity::ANNOUNCE),
+ 'deleted' => false
+ ], []);
+ $count_like = Post::countPosts([
+ 'thr-parent-id' => $uriId,
+ 'gravity' => GRAVITY_ACTIVITY,
+ 'vid' => Verb::getID(Activity::LIKE),
+ 'deleted' => false
+ ], []);
$counts = new \Friendica\Object\Api\Mastodon\Status\Counts(
Post::countPosts(['thr-parent-id' => $uriId, 'gravity' => GRAVITY_COMMENT, 'deleted' => false], []),
- Post::countPosts([
- 'thr-parent-id' => $uriId,
- 'gravity' => GRAVITY_ACTIVITY,
- 'vid' => Verb::getID(Activity::ANNOUNCE),
- 'deleted' => false
- ], []),
- Post::countPosts([
- 'thr-parent-id' => $uriId,
- 'gravity' => GRAVITY_ACTIVITY,
- 'vid' => Verb::getID(Activity::LIKE),
- 'deleted' => false
- ], [])
+ $count_announce,
+ $count_like
);
+ $origin_like = ($count_like == 0) ? false : Post::exists([
+ 'thr-parent-id' => $uriId,
+ 'uid' => $uid,
+ 'origin' => true,
+ 'gravity' => GRAVITY_ACTIVITY,
+ 'vid' => Verb::getID(Activity::LIKE),
+ 'deleted' => false
+ ]);
+ $origin_announce = ($count_announce == 0) ? false : Post::exists([
+ 'thr-parent-id' => $uriId,
+ 'uid' => $uid,
+ 'origin' => true,
+ 'gravity' => GRAVITY_ACTIVITY,
+ 'vid' => Verb::getID(Activity::ANNOUNCE),
+ 'deleted' => false
+ ]);
$userAttributes = new \Friendica\Object\Api\Mastodon\Status\UserAttributes(
- Post::exists([
- 'thr-parent-id' => $uriId,
- 'uid' => $uid,
- 'origin' => true,
- 'gravity' => GRAVITY_ACTIVITY,
- 'vid' => Verb::getID(Activity::LIKE)
- , 'deleted' => false
- ]),
- Post::exists([
- 'thr-parent-id' => $uriId,
- 'uid' => $uid,
- 'origin' => true,
- 'gravity' => GRAVITY_ACTIVITY,
- 'vid' => Verb::getID(Activity::ANNOUNCE),
- 'deleted' => false
- ]),
+ $origin_like,
+ $origin_announce,
Post\ThreadUser::getIgnored($uriId, $uid),
(bool)($item['starred'] && ($item['gravity'] == GRAVITY_PARENT)),
$item['featured']
$mentions = $this->mstdnMentionFactory->createFromUriId($uriId)->getArrayCopy();
$tags = $this->mstdnTagFactory->createFromUriId($uriId);
- $card = $this->mstdnCardFactory->createFromUriId($uriId);
- $attachments = $this->mstdnAttachementFactory->createFromUriId($uriId);
+ if ($item['has-media']) {
+ $card = $this->mstdnCardFactory->createFromUriId($uriId);
+ $attachments = $this->mstdnAttachementFactory->createFromUriId($uriId);
+ } else {
+ $card = new \Friendica\Object\Api\Mastodon\Card([]);
+ $attachments = [];
+ }
if (!empty($item['question-id'])) {
$poll = $this->mstdnPollFactory->createFromId($item['question-id'], $uid)->toArray();
}
}
-
if ($item['vid'] == Verb::getID(Activity::ANNOUNCE)) {
$reshare = $this->createFromUriId($item['thr-parent-id'], $uid)->toArray();
$reshared_item = Post::selectFirst(['title', 'body'], ['uri-id' => $item['thr-parent-id'],'uid' => [0, $uid]]);
* Creates an account record from a public contact record. Expects all contact table fields to be set.
*
* @param BaseURL $baseUrl
- * @param array $publicContact Full contact table record with uid = 0
- * @param array $apcontact Optional full apcontact table record
- * @param array $userContact Optional full contact table record with uid != 0
- * @param array $fcontact Optional full fcontact table record
+ * @param array $contact entry of "account-user-view"
+ * @param Fields $fields Profile fields
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public function __construct(BaseURL $baseUrl, array $publicContact, Fields $fields, array $apcontact = [], array $userContact = [], array $fcontact = [])
+ public function __construct(BaseURL $baseUrl, array $contact, Fields $fields)
{
- $this->id = (string)$publicContact['id'];
- $this->username = $publicContact['nick'];
+ $this->id = (string)$contact['pid'];
+ $this->username = $contact['nick'];
$this->acct =
- strpos($publicContact['url'], $baseUrl->get() . '/') === 0 ?
- $publicContact['nick'] :
- $publicContact['addr'];
- $this->display_name = $publicContact['name'];
- $this->locked = (bool)$publicContact['manually-approve'] ?? !empty($apcontact['manually-approve']);
- $this->bot = ($publicContact['contact-type'] == Contact::TYPE_NEWS);
- $this->discoverable = !$publicContact['unsearchable'];
- $this->group = ($publicContact['contact-type'] == Contact::TYPE_COMMUNITY);
+ strpos($contact['url'], $baseUrl->get() . '/') === 0 ?
+ $contact['nick'] :
+ $contact['addr'];
+ $this->display_name = $contact['name'];
+ $this->locked = (bool)$contact['manually-approve'];
+ $this->bot = ($contact['contact-type'] == Contact::TYPE_NEWS);
+ $this->discoverable = !$contact['unsearchable'];
+ $this->group = ($contact['contact-type'] == Contact::TYPE_COMMUNITY);
- $publicContactCreated = $publicContact['created'] ?: DBA::NULL_DATETIME;
- $userContactCreated = $userContact['created'] ?? DBA::NULL_DATETIME;
+ $this->created_at = DateTimeFormat::utc($contact['created'] ?: DBA::NULL_DATETIME, DateTimeFormat::JSON);
- $created = $userContactCreated < $publicContactCreated && ($userContactCreated != DBA::NULL_DATETIME) ? $userContactCreated : $publicContactCreated;
- $this->created_at = DateTimeFormat::utc($created, DateTimeFormat::JSON);
-
- $this->note = BBCode::convertForUriId($publicContact['uri-id'] ?? 0, $publicContact['about'], BBCode::EXTERNAL);
- $this->url = $publicContact['url'];
- $this->avatar = Contact::getAvatarUrlForId($userContact['id'] ?? 0 ?: $publicContact['id'], Proxy::SIZE_SMALL, $userContact['updated'] ?? '' ?: $publicContact['updated']);
+ $this->note = BBCode::convertForUriId($contact['uri-id'], $contact['about'], BBCode::EXTERNAL);
+ $this->url = $contact['url'];
+ $this->avatar = Contact::getAvatarUrlForId($contact['id'] ?? 0 ?: $contact['pid'], Proxy::SIZE_SMALL, $contact['updated'], $contact['guid'] ?? '');
$this->avatar_static = $this->avatar;
- $this->header = Contact::getHeaderUrlForId($userContact['id'] ?? 0 ?: $publicContact['id'], '', $userContact['updated'] ?? '' ?: $publicContact['updated']);
+ $this->header = Contact::getHeaderUrlForId($contact['id'] ?? 0 ?: $contact['pid'], '', $contact['updated'], $contact['guid'] ?? '');
$this->header_static = $this->header;
- $this->followers_count = $apcontact['followers_count'] ?? $fcontact['interacted_count'] ?? 0;
- $this->following_count = $apcontact['following_count'] ?? $fcontact['interacting_count'] ?? 0;
- $this->statuses_count = $apcontact['statuses_count'] ?? $fcontact['post_count'] ?? 0;
-
- $publicContactLastItem = $publicContact['last-item'] ?: DBA::NULL_DATETIME;
- $userContactLastItem = $userContact['last-item'] ?? DBA::NULL_DATETIME;
+ $this->followers_count = $contact['ap-followers_count'] ?? $contact['diaspora-interacted_count'] ?? 0;
+ $this->following_count = $contact['ap-following_count'] ?? $contact['diaspora-interacting_count'] ?? 0;
+ $this->statuses_count = $contact['ap-statuses_count'] ?? $contact['diaspora-post_count'] ?? 0;
- $lastItem = $userContactLastItem > $publicContactLastItem ? $userContactLastItem : $publicContactLastItem;
+ $lastItem = $contact['last-item'] ?: DBA::NULL_DATETIME;
$this->last_status_at = $lastItem != DBA::NULL_DATETIME ? DateTimeFormat::utc($lastItem, 'Y-m-d') : null;
// No custom emojis per account in Friendica
$this->emojis = [];
$this->fields = $fields->getArrayCopy();
-
}
/**
use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
- define('DB_UPDATE_VERSION', 1468);
+ define('DB_UPDATE_VERSION', 1469);
}
return [
"target" => ["post-content", "target"],
"resource-id" => ["post-content", "resource-id"],
"contact-id" => ["post-user", "contact-id"],
+ "contact-uri-id" => ["contact", "uri-id"],
"contact-link" => ["contact", "url"],
"contact-addr" => ["contact", "addr"],
"contact-name" => ["contact", "name"],
"avatar-date" => ["contact", "avatar-date"],
"thumb" => ["contact", "thumb"],
"author-id" => ["post-user", "author-id"],
+ "author-uri-id" => ["author", "uri-id"],
"author-link" => ["author", "url"],
"author-addr" => ["author", "addr"],
"author-name" => "IF (`contact`.`url` = `author`.`url` AND `contact`.`name` != '', `contact`.`name`, `author`.`name`)",
"author-gsid" => ["author", "gsid"],
"author-uri-id" => ["author", "uri-id"],
"owner-id" => ["post-user", "owner-id"],
+ "owner-uri-id" => ["owner", "uri-id"],
"owner-link" => ["owner", "url"],
"owner-addr" => ["owner", "addr"],
"owner-name" => "IF (`contact`.`url` = `owner`.`url` AND `contact`.`name` != '', `contact`.`name`, `owner`.`name`)",
"owner-updated" => ["owner", "updated"],
"owner-contact-type" => ["owner", "contact-type"],
"causer-id" => ["post-user", "causer-id"],
+ "causer-uri-id" => ["causer", "uri-id"],
"causer-link" => ["causer", "url"],
"causer-addr" => ["causer", "addr"],
"causer-name" => ["causer", "name"],
"target" => ["post-content", "target"],
"resource-id" => ["post-content", "resource-id"],
"contact-id" => ["post-thread-user", "contact-id"],
+ "contact-uri-id" => ["contact", "uri-id"],
"contact-link" => ["contact", "url"],
"contact-addr" => ["contact", "addr"],
"contact-name" => ["contact", "name"],
"avatar-date" => ["contact", "avatar-date"],
"thumb" => ["contact", "thumb"],
"author-id" => ["post-thread-user", "author-id"],
+ "author-uri-id" => ["author", "uri-id"],
"author-link" => ["author", "url"],
"author-addr" => ["author", "addr"],
"author-name" => "IF (`contact`.`url` = `author`.`url` AND `contact`.`name` != '', `contact`.`name`, `author`.`name`)",
"author-gsid" => ["author", "gsid"],
"author-uri-id" => ["author", "uri-id"],
"owner-id" => ["post-thread-user", "owner-id"],
+ "owner-uri-id" => ["owner", "uri-id"],
"owner-link" => ["owner", "url"],
"owner-addr" => ["owner", "addr"],
"owner-name" => "IF (`contact`.`url` = `owner`.`url` AND `contact`.`name` != '', `contact`.`name`, `owner`.`name`)",
"owner-updated" => ["owner", "updated"],
"owner-contact-type" => ["owner", "contact-type"],
"causer-id" => ["post-thread-user", "causer-id"],
+ "causer-uri-id" => ["causer", "uri-id"],
"causer-link" => ["causer", "url"],
"causer-addr" => ["causer", "addr"],
"causer-name" => ["causer", "name"],
"target" => ["post-content", "target"],
"resource-id" => ["post-content", "resource-id"],
"contact-id" => ["post", "author-id"],
+ "contact-uri-id" => ["author", "uri-id"],
"contact-link" => ["author", "url"],
"contact-addr" => ["author", "addr"],
"contact-name" => ["author", "name"],
"avatar-date" => ["author", "avatar-date"],
"thumb" => ["author", "thumb"],
"author-id" => ["post", "author-id"],
+ "author-uri-id" => ["author", "uri-id"],
"author-link" => ["author", "url"],
"author-addr" => ["author", "addr"],
"author-name" => ["author", "name"],
"author-gsid" => ["author", "gsid"],
"author-uri-id" => ["author", "uri-id"],
"owner-id" => ["post", "owner-id"],
+ "owner-uri-id" => ["owner", "uri-id"],
"owner-link" => ["owner", "url"],
"owner-addr" => ["owner", "addr"],
"owner-name" => ["owner", "name"],
"owner-updated" => ["owner", "updated"],
"owner-contact-type" => ["owner", "contact-type"],
"causer-id" => ["post", "causer-id"],
+ "causer-uri-id" => ["causer", "uri-id"],
"causer-link" => ["causer", "url"],
"causer-addr" => ["causer", "addr"],
"causer-name" => ["causer", "name"],
"target" => ["post-content", "target"],
"resource-id" => ["post-content", "resource-id"],
"contact-id" => ["post-thread", "author-id"],
+ "contact-uri-id" => ["author", "uri-id"],
"contact-link" => ["author", "url"],
"contact-addr" => ["author", "addr"],
"contact-name" => ["author", "name"],
"avatar-date" => ["author", "avatar-date"],
"thumb" => ["author", "thumb"],
"author-id" => ["post-thread", "author-id"],
+ "author-uri-id" => ["author", "uri-id"],
"author-link" => ["author", "url"],
"author-addr" => ["author", "addr"],
"author-name" => ["author", "name"],
"author-gsid" => ["author", "gsid"],
"author-uri-id" => ["author", "uri-id"],
"owner-id" => ["post-thread", "owner-id"],
+ "owner-uri-id" => ["owner", "uri-id"],
"owner-link" => ["owner", "url"],
"owner-addr" => ["owner", "addr"],
"owner-name" => ["owner", "name"],
"owner-updated" => ["owner", "updated"],
"owner-contact-type" => ["owner", "contact-type"],
"causer-id" => ["post-thread", "causer-id"],
+ "causer-uri-id" => ["causer", "uri-id"],
"causer-link" => ["causer", "url"],
"causer-addr" => ["causer", "addr"],
"causer-name" => ["causer", "name"],
"diaspora-notify" => ["fcontact", "notify"],
"diaspora-poll" => ["fcontact", "poll"],
"diaspora-alias" => ["fcontact", "alias"],
+ "diaspora-interacting_count" => ["fcontact", "interacting_count"],
+ "diaspora-interacted_count" => ["fcontact", "interacted_count"],
+ "diaspora-post_count" => ["fcontact", "post_count"],
"ap-uuid" => ["apcontact", "uuid"],
"ap-type" => ["apcontact", "type"],
"ap-following" => ["apcontact", "following"],