- if (isset($item["uri"]) AND (($item["uri"] == $arr["uri"]) OR ($item["uri"] == $single_conv->id))) {
- $copy_fields = array("owner-name", "owner-link", "owner-avatar", "author-name", "author-link", "author-avatar",
- "gravity", "body", "object-type", "object", "verb", "created", "edited", "coord", "tag",
- "title", "attach", "app", "type", "location", "contact-id", "uri");
- foreach ($copy_fields AS $field)
- if (isset($item[$field]))
- $arr[$field] = $item[$field];
-
+ if (isset($item["uri"]) && (($item["uri"] == $arr["uri"]) || ($item["uri"] == $single_conv->id))) {
+ logger('Use stored item array for item with URI '.$item["uri"], LOGGER_DEBUG);
+ $newitem = item_store($item);
+ $item = array();
+ $item_stored = $newitem;
+ } else {
+ $newitem = item_store($arr);