aboutsummaryrefslogtreecommitdiffstats
path: root/include/poller.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-19 18:53:35 -0700
committerFriendika <info@friendika.com>2011-05-19 18:53:35 -0700
commite51e772abcddeae77f8c6003290922922afed11a (patch)
tree24683dbd93c49855b928d02de34c2668f59cef8a /include/poller.php
parent44d5c90af446537ddd292caff0cd85370a7339ab (diff)
downloadvolse-hubzilla-e51e772abcddeae77f8c6003290922922afed11a.tar.gz
volse-hubzilla-e51e772abcddeae77f8c6003290922922afed11a.tar.bz2
volse-hubzilla-e51e772abcddeae77f8c6003290922922afed11a.zip
typo in email delete sql, add message sender to body for better handling of mailing lists
Diffstat (limited to 'include/poller.php')
-rw-r--r--include/poller.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/poller.php b/include/poller.php
index dd2efcb76..7490bfa81 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -358,7 +358,7 @@ function poller_run($argv, $argc){
if(count($r)) {
if($meta->deleted && ! $r[0]['deleted']) {
- q("UPDATE `item` SET `deleted` = `, `changed` = '%s' WHERE `id` = %d LIMIT 1",
+ q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `id` = %d LIMIT 1",
dbesc(datetime_convert()),
intval($r[0]['id'])
);
@@ -372,6 +372,13 @@ function poller_run($argv, $argc){
if(! $r)
continue;
$datarray['body'] = escape_tags($r['body']);
+
+ // some mailing lists have the original author as 'from' - add this sender info to msg body.
+ // todo: adding a gravatar for the original author would be cool
+
+ if(! stristr($meta->from,$contact['addr']))
+ $datarray['body'] = t('From: ') . escape_tags($meta->from) . "\n\n" . $datarray['body'];
+
$datarray['uid'] = $importer_uid;
$datarray['contact-id'] = $contact['id'];
if($datarray['parent-uri'] === $datarray['uri'])