aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-07 15:36:03 -0700
committerFriendika <info@friendika.com>2011-07-07 15:36:03 -0700
commit0470eb78054c4d26171f5affe7848adcf22a3604 (patch)
treec606f089cce43ce09d59dd97572ed7efcb8259f2 /include/conversation.php
parent5ab30578ae154d1e21b540f9b71dc29defa7d5d3 (diff)
parent8cc6e69705c40b942ff74f757d8db743c479646a (diff)
downloadvolse-hubzilla-0470eb78054c4d26171f5affe7848adcf22a3604.tar.gz
volse-hubzilla-0470eb78054c4d26171f5affe7848adcf22a3604.tar.bz2
volse-hubzilla-0470eb78054c4d26171f5affe7848adcf22a3604.zip
Merge branch 'pull'
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 09623ff74..6b52f51cd 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -17,7 +17,26 @@ function localize_item(&$item){
$author = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
$objauthor = '[url=' . $obj['author-link'] . ']' . $obj['author-name'] . '[/url]';
- $post_type = (($obj['resource-id']) ? t('photo') : t('status'));
+ switch($obj['verb']){
+ case 'http://activitystrea.ms/schema/1.0/post':
+ switch ($obj['object-type']){
+ case 'http://activitystrea.ms/schema/1.0/event':
+ $post_type = t('event');
+ break;
+ default:
+ $post_type = t('status');
+ }
+ break;
+ default:
+ if($obj['resource-id']){
+ $post_type = t('photo');
+ $m=array(); preg_match("/\[url=([^]]*)\]/", $obj['body'], $m);
+ $rr['plink'] = $m[1];
+ } else {
+ $post_type = t('status');
+ }
+ }
+
$plink = '[url=' . $obj['plink'] . ']' . $post_type . '[/url]';
switch($item['verb']){
@@ -779,4 +798,4 @@ function status_editor($a,$x, $notes_cid = 0) {
));
return $o;
-} \ No newline at end of file
+}