diff options
author | friendica <info@friendica.com> | 2013-10-11 23:12:10 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-10-11 23:12:10 -0700 |
commit | 1c8a36f9ca1f1cfd4cab47b47c855b530467593d (patch) | |
tree | 79bffc25d168bcc1d3b12147925440a4f76beeb6 /mod | |
parent | 7e850e0687ed30231bd185e8a19776a11a74d2a8 (diff) | |
download | volse-hubzilla-1c8a36f9ca1f1cfd4cab47b47c855b530467593d.tar.gz volse-hubzilla-1c8a36f9ca1f1cfd4cab47b47c855b530467593d.tar.bz2 volse-hubzilla-1c8a36f9ca1f1cfd4cab47b47c855b530467593d.zip |
mail recall
Diffstat (limited to 'mod')
-rw-r--r-- | mod/message.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mod/message.php b/mod/message.php index 652481579..058641a5e 100644 --- a/mod/message.php +++ b/mod/message.php @@ -233,6 +233,24 @@ function message_content(&$a) { } } + if((argc() == 3) && (argv(1) === 'recall')) { + if(! intval(argv(2))) + return; + $cmd = argv(1); + $r = q("update mail set mail_flags = mail_flags | %d where id = %d and channel_id = %d limit 1", + intval(MAIL_RECALLED), + intval(argv(2)), + intval(local_user()) + ); + proc_run('php','include/notifier.php','mail',intval(argv(2))); + + if($r) { + info( t('Message recalled.') . EOL ); + } + goaway($a->get_baseurl(true) . '/message' ); + + } + if((argc() > 1) && ($a->argv[1] === 'new')) { @@ -422,6 +440,9 @@ function message_content(&$a) { 'subject' => $message['title'], 'body' => smilies(bbcode($message['body']) . $s), 'delete' => t('Delete message'), + 'recall' => t('Recall message'), + 'can_recall' => (($channel['channel_hash'] == $message['from_xchan']) ? true : false), + 'is_recalled' => (($message['mail_flags'] & MAIL_RECALLED) ? t('Message has been recalled.') : ''), 'date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'],'D, d M Y - g:i A'), ); |