drop mail delivered flag now that queue is implemented

This commit is contained in:
Friendika 2010-11-23 16:08:48 -08:00
parent 15f011b34c
commit 9be4b3482e
5 changed files with 7 additions and 23 deletions

View file

@ -227,7 +227,6 @@ CREATE TABLE IF NOT EXISTS `mail` (
`contact-id` char(255) NOT NULL, `contact-id` char(255) NOT NULL,
`title` char(255) NOT NULL, `title` char(255) NOT NULL,
`body` text NOT NULL, `body` text NOT NULL,
`delivered` tinyint(1) NOT NULL,
`seen` tinyint(1) NOT NULL, `seen` tinyint(1) NOT NULL,
`replied` tinyint(1) NOT NULL, `replied` tinyint(1) NOT NULL,
`uri` char(255) NOT NULL, `uri` char(255) NOT NULL,

View file

@ -313,14 +313,6 @@
} }
break; break;
} }
if(($cmd === 'mail') && ($deliver_status == 0)) {
$r = q("UPDATE `mail` SET `delivered` = 1 WHERE `id` = %d LIMIT 1",
intval($item_id)
);
}
} }
// send additional slaps to mentioned remote tags (@foo@example.com) // send additional slaps to mentioned remote tags (@foo@example.com)

View file

@ -105,7 +105,6 @@ function dfrn_notify_post(&$a) {
$msg['contact-id'] = $importer['id']; $msg['contact-id'] = $importer['id'];
$msg['title'] = notags(unxmlify($base['subject'][0]['data'])); $msg['title'] = notags(unxmlify($base['subject'][0]['data']));
$msg['body'] = escape_tags(unxmlify($base['content'][0]['data'])); $msg['body'] = escape_tags(unxmlify($base['content'][0]['data']));
$msg['delivered'] = 1;
$msg['seen'] = 0; $msg['seen'] = 0;
$msg['replied'] = 0; $msg['replied'] = 0;
$msg['uri'] = notags(unxmlify($base['id'][0]['data'])); $msg['uri'] = notags(unxmlify($base['id'][0]['data']));

View file

@ -47,8 +47,8 @@ function message_post(&$a) {
$replyto = $uri; $replyto = $uri;
$r = q("INSERT INTO `mail` ( `uid`, `from-name`, `from-photo`, `from-url`, $r = q("INSERT INTO `mail` ( `uid`, `from-name`, `from-photo`, `from-url`,
`contact-id`, `title`, `body`, `delivered`, `seen`, `replied`, `uri`, `parent-uri`, `created`) `contact-id`, `title`, `body`, `seen`, `replied`, `uri`, `parent-uri`, `created`)
VALUES ( %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, %d, '%s', '%s', '%s' )", VALUES ( %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, '%s', '%s', '%s' )",
intval(local_user()), intval(local_user()),
dbesc($me[0]['name']), dbesc($me[0]['name']),
dbesc($me[0]['thumb']), dbesc($me[0]['thumb']),
@ -56,7 +56,6 @@ function message_post(&$a) {
intval($recipient), intval($recipient),
dbesc($subject), dbesc($subject),
dbesc($body), dbesc($body),
0,
1, 1,
0, 0,
dbesc($uri), dbesc($uri),
@ -138,16 +137,6 @@ function message_content(&$a) {
} }
} }
if(($a->argc > 2) && ($a->argv[1] === 'redeliver') && intval($a->argv[2])) {
$post_id = intval($a->argv[2]);
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"mail\" \"$post_id\" & ",
array(),$foo));
goaway($a->get_baseurl() . '/message' );
}
if(($a->argc > 1) && ($a->argv[1] === 'new')) { if(($a->argc > 1) && ($a->argv[1] === 'new')) {

View file

@ -176,3 +176,8 @@ function update_1018() {
`content` MEDIUMTEXT NOT NULL `content` MEDIUMTEXT NOT NULL
) ENGINE = MYISAM DEFAULT CHARSET=utf8 "); ) ENGINE = MYISAM DEFAULT CHARSET=utf8 ");
} }
function update_1019() {
q("ALTER TABLE `mail` DROP `delivered`");
// leaving open for more updates as this isn't critical enough to roll the build number
}