aboutsummaryrefslogtreecommitdiffstats
path: root/mod/message.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-11-29 19:52:14 -0800
committerfriendica <info@friendica.com>2011-11-29 19:52:14 -0800
commit7474c48022e56bf32cf98271b3f58f211a7692fe (patch)
treedefd8b0b8b0b1e4f96dad1382b4ee082b82199ef /mod/message.php
parent7b9ba3bb031099158c7cb91f1aeb1b5b63326d2c (diff)
downloadvolse-hubzilla-7474c48022e56bf32cf98271b3f58f211a7692fe.tar.gz
volse-hubzilla-7474c48022e56bf32cf98271b3f58f211a7692fe.tar.bz2
volse-hubzilla-7474c48022e56bf32cf98271b3f58f211a7692fe.zip
add tag to personal
Diffstat (limited to 'mod/message.php')
-rw-r--r--mod/message.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/mod/message.php b/mod/message.php
index 39aa0479f..97868ab18 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -89,16 +89,27 @@ function message_content(&$a) {
goaway($a->get_baseurl() . '/message' );
}
else {
- $r = q("SELECT `parent-uri` FROM `mail` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ $r = q("SELECT `parent-uri`,`convid` FROM `mail` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($a->argv[2]),
intval(local_user())
);
if(count($r)) {
$parent = $r[0]['parent-uri'];
+ $convid = $r[0]['convid'];
+
$r = q("DELETE FROM `mail` WHERE `parent-uri` = '%s' AND `uid` = %d ",
dbesc($parent),
intval(local_user())
);
+
+ // remove diaspora conversation pointer
+
+ if($convid) {
+ q("delete from conv where id = %d limit 1",
+ intval($convid)
+ );
+ }
+
if($r)
info( t('Conversation removed.') . EOL );
}