forked from friendica/friendica-addons
Set extid via guid, nit via id
This commit is contained in:
parent
a04d22ad01
commit
3719d1eee5
2 changed files with 3 additions and 3 deletions
|
@ -715,7 +715,7 @@ function bluesky_create_activity(array $item, stdClass $parent = null)
|
||||||
}
|
}
|
||||||
Logger::debug('Activity done', ['return' => $activity]);
|
Logger::debug('Activity done', ['return' => $activity]);
|
||||||
$uri = bluesky_get_uri($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]);
|
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)) {
|
if (($key == 0) && ($item['gravity'] != Item::GRAVITY_PARENT)) {
|
||||||
$uri = bluesky_get_uri($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]);
|
Logger::debug('Set extid', ['id' => $item['id'], 'extid' => $uri]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -564,7 +564,7 @@ function tumblr_send(array &$b)
|
||||||
if ($result->meta->status < 400) {
|
if ($result->meta->status < 400) {
|
||||||
Logger::info('Successfully performed activity', ['verb' => $b['verb'], 'deleted' => $b['deleted'], 'meta' => $result->meta, 'response' => $result->response]);
|
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)) {
|
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 {
|
} else {
|
||||||
Logger::notice('Error while performing activity', ['verb' => $b['verb'], 'deleted' => $b['deleted'], 'meta' => $result->meta, 'response' => $result->response, 'errors' => $result->errors, 'params' => $params]);
|
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 a new issue