Logger::log('diaspora_send: requeueing '.$b['uid'], Logger::DEBUG);
- $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `self`", $b['uid']);
- if (count($r))
- $a->contact = $r[0]["id"];
-
- $s = serialize(['url' => $url, 'item' => $b['id'], 'post' => $body]);
-
Worker::defer();
- notice(L10n::t('Diaspora post failed. Deferred for retry.').EOL);
}
}
}
}
} else {
Logger::log('pumpio_send '.$username.': '.$url.' general error: ' . print_r($user, true));
-
- $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `self`", $b['uid']);
- if (DBA::isResult($r)) {
- $a->contact = $r[0]["id"];
- }
-
- $s = serialize(['url' => $url, 'item' => $b['id'], 'post' => $params]);
-
Worker::defer();
- notice(L10n::t('Pump.io post failed. Deferred for retry.').EOL);
}
}
}
Logger::log('pumpio_action '.$username.' '.$action.': success '.$uri);
} else {
Logger::log('pumpio_action '.$username.' '.$action.': general error: '.$uri.' '.print_r($user, true));
-
- $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `self`", $uid);
- if (DBA::isResult($r)) {
- $a->contact = $r[0]["id"];
- }
-
- $s = serialize(['url' => $url, 'item' => $orig_post["id"], 'post' => $params]);
-
Worker::defer();
- notice(L10n::t('Pump.io like failed. Deferred for retry.').EOL);
}
}
if (!empty($result->errors)) {
Logger::log('Send to Twitter failed: "' . print_r($result->errors, true) . '"');
-
- $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `self`", intval($b['uid']));
- if (DBA::isResult($r)) {
- $a->contact = $r[0]["id"];
- }
-
- $s = serialize(['url' => $url, 'item' => $b['id'], 'post' => $post]);
-
Worker::defer();
- notice(L10n::t('Twitter post failed. Deferred for retry.') . EOL);
} elseif ($iscomment) {
Logger::log('twitter_post: Update extid ' . $result->id_str . " for post id " . $b['id']);
Item::update(['extid' => "twitter::" . $result->id_str], ['id' => $b['id']]);