From 65912ec0bfb112fd3dca4a8823bb834a1b1c80fc Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 18 Feb 2013 15:15:55 -0800 Subject: moving on --- mod/post.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'mod') diff --git a/mod/post.php b/mod/post.php index b7c16ff9a..e5fa1a418 100644 --- a/mod/post.php +++ b/mod/post.php @@ -236,6 +236,31 @@ function post_post(&$a) { if(array_key_exists('recipients',$data)) $recipients = $data['recipients']; + + if($msgtype === 'purge') { + if($recipients) { + // basically this means "unfriend" + foreach($recipients as $recip) { + + + + } + + + } + else { + // basically this means the channel has committed suicide + $arr = $data['sender']; + $sender_hash = base64url_encode(hash('whirlpool',$arr['guid'] . $arr['guid_sig'], true)); + + require_once('include/Contact.php'); + remove_all_xchan_resources($sender_hash); + + $ret['result'] = true; + json_return_and_die($ret); + + } + } if($msgtype === 'refresh') { // remote channel info (such as permissions or photo or something) -- cgit v1.2.3