Set extid via guid, nit via id
parent
a04d22ad01
commit
3719d1eee5
|
@ -715,7 +715,7 @@ function bluesky_create_activity(array $item, stdClass $parent = null)
|
|||
}
|
||||
Logger::debug('Activity done', ['return' => $activity]);
|
||||
$uri = bluesky_get_uri($activity);
|
||||
Item::update(['extid' => $uri], ['id' => $item['id']]);
|
||||
Item::update(['extid' => $uri], ['guid' => $item['guid']]);
|
||||
Logger::debug('Set extid', ['id' => $item['id'], 'extid' => $activity]);
|
||||
}
|
||||
|
||||
|
@ -806,7 +806,7 @@ function bluesky_create_post(array $item, stdClass $root = null, stdClass $paren
|
|||
}
|
||||
if (($key == 0) && ($item['gravity'] != Item::GRAVITY_PARENT)) {
|
||||
$uri = bluesky_get_uri($parent);
|
||||
Item::update(['extid' => $uri], ['id' => $item['id']]);
|
||||
Item::update(['extid' => $uri], ['guid' => $item['guid']]);
|
||||
Logger::debug('Set extid', ['id' => $item['id'], 'extid' => $uri]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -564,7 +564,7 @@ function tumblr_send(array &$b)
|
|||
if ($result->meta->status < 400) {
|
||||
Logger::info('Successfully performed activity', ['verb' => $b['verb'], 'deleted' => $b['deleted'], 'meta' => $result->meta, 'response' => $result->response]);
|
||||
if (!$b['deleted'] && !empty($result->response->id_string)) {
|
||||
Item::update(['extid' => 'tumblr::' . $result->response->id_string], ['id' => $b['id']]);
|
||||
Item::update(['extid' => 'tumblr::' . $result->response->id_string], ['guid' => $b['guid']]);
|
||||
}
|
||||
} else {
|
||||
Logger::notice('Error while performing activity', ['verb' => $b['verb'], 'deleted' => $b['deleted'], 'meta' => $result->meta, 'response' => $result->response, 'errors' => $result->errors, 'params' => $params]);
|
||||
|
|
Loading…
Reference in New Issue