$data = ['status' => $ret];
switch ($type) {
case "atom":
+ break;
case "rss":
$data = api_rss_extra($a, $data, $user_info);
break;
$data = ['status' => $ret];
switch ($type) {
case "atom":
+ break;
case "rss":
$data = api_rss_extra($a, $data, $user_info);
break;
$data = ['status' => $ret];
switch ($type) {
case "atom":
+ break;
case "rss":
$data = api_rss_extra($a, $data, $user_info);
break;
$data = ['status' => $ret];
switch ($type) {
case "atom":
+ break;
case "rss":
$data = api_rss_extra($a, $data, $user_info);
break;
$data = ['status' => $ret];
switch ($type) {
case "atom":
+ break;
case "rss":
$data = api_rss_extra($a, $data, $user_info);
break;
$data = ['status' => $ret];
switch ($type) {
case "atom":
+ break;
case "rss":
$data = api_rss_extra($a, $data, $user_info);
+ break;
}
return api_format_data("status", $type, $data);
$data = ['status' => $ret];
switch ($type) {
case "atom":
+ break;
case "rss":
$data = api_rss_extra($a, $data, $user_info);
+ break;
}
return api_format_data("statuses", $type, $data);
$data = ['status' => $items];
switch ($type) {
case "atom":
+ break;
case "rss":
$data = api_rss_extra($a, $data, $user_info);
break;
switch ($type) {
case "atom":
+ break;
case "rss":
$data = api_rss_extra($a, $data, $sender);
+ break;
}
return api_format_data("direct-messages", $type, $data);
$data = ['direct_message' => $ret];
switch ($type) {
case "atom":
+ break;
case "rss":
$data = api_rss_extra($a, $data, $user_info);
+ break;
}
return api_format_data("direct-messages", $type, $data);
// fetch user from database given the nickname
$condition = ['nickname' => $nick, 'account_expired' => false, 'account_removed' => false];
- $owner = DBA::selectFirst('user', ['uid', 'hidewall'], $condition);
+ $owner = DBA::selectFirst('user', ['uid', 'hidewall', 'nickname'], $condition);
if (!DBA::isResult($owner)) {
Logger::log('Local account not found: ' . $nick . ' - topic: ' . $hub_topic . ' - callback: ' . $hub_callback);
System::httpExit(404);
// sanity check that topic URLs are the same
$hub_topic2 = str_replace('/feed/', '/dfrn_poll/', $hub_topic);
- if (!Strings::compareLink($hub_topic, $contact['poll']) && !Strings::compareLink($hub_topic2, $contact['poll'])) {
+ $self = System::baseUrl() . '/api/statuses/user_timeline/' . $owner['nickname'] . '.atom';
+
+ if (!Strings::compareLink($hub_topic, $contact['poll']) && !Strings::compareLink($hub_topic2, $contact['poll']) && !Strings::compareLink($hub_topic, $self)) {
Logger::log('Hub topic ' . $hub_topic . ' != ' . $contact['poll']);
System::httpExit(404);
}