repeated items from ostatus and diaspora are now using the share-element.

Some design changes to repeated items in "vier".
This commit is contained in:
Michael Vogel 2012-12-19 12:18:52 +01:00
parent 9ab34f8857
commit c22f65bafa
9 changed files with 56 additions and 20 deletions

View file

@ -439,14 +439,14 @@ function delivery_run(&$argv, &$argc){
}
if(! $it)
break;
$local_user = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
intval($uid)
);
if(! count($local_user))
break;
$reply_to = '';
$r1 = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
intval($uid)
@ -482,12 +482,21 @@ function delivery_run(&$argv, &$argc){
if($it['uri'] !== $it['parent-uri']) {
$headers .= 'References: <' . iri2msgid($it['parent-uri']) . '>' . "\n";
if(!strlen($it['title'])) {
$r = q("SELECT `title` FROM `item` WHERE `parent-uri` = '%s' LIMIT 1",
dbesc($it['parent-uri']));
if(!$it['title']) {
$r = q("SELECT `title` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($it['parent-uri']),
intval($uid));
if(count($r) AND ($r[0]['title'] != ''))
$subject = $r[0]['title'];
else {
$r = q("SELECT `title` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($it['parent-uri']),
intval($uid));
if(count($r) AND ($r[0]['title'] != ''))
$subject = $r[0]['title'];
}
}
if(strncasecmp($subject,'RE:',3))
$subject = 'Re: '.$subject;