https://reisub.nsupdate.info/git
/
friendica.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5d694f
)
Improved ID detection
author
Michael
<heluecht@pirati.ca>
Sun, 20 Jan 2019 22:19:53 +0000
(22:19 +0000)
committer
Michael
<heluecht@pirati.ca>
Sun, 20 Jan 2019 22:19:53 +0000
(22:19 +0000)
src/Protocol/ActivityPub/Transmitter.php
patch
|
blob
|
history
diff --git
a/src/Protocol/ActivityPub/Transmitter.php
b/src/Protocol/ActivityPub/Transmitter.php
index
cab0030
..
671f427
100644
(file)
--- a/
src/Protocol/ActivityPub/Transmitter.php
+++ b/
src/Protocol/ActivityPub/Transmitter.php
@@
-1029,8
+1029,17
@@
class Transmitter
return self::createNote($item);
}
- /// @todo Better fetch the real object url.
- return $announce['plink'];
+ // Fetch the original id of the object
+ $activity = ActivityPub::fetchContent($announce['plink'], $item['uid']);
+ if (!empty($activity)) {
+ $ldactivity = JsonLD::compact($activity);
+ $id = JsonLD::fetchElement($ldactivity, '@id');
+ if (!empty($id)) {
+ return $id;
+ }
+ }
+
+ return self::createNote($item);
}
/**