aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-05 19:19:11 -0700
committerFriendika <info@friendika.com>2011-07-05 19:19:11 -0700
commit76e56fd44e4a8b43bdf42fae64484e5bb69dd450 (patch)
tree2d25529b18a8ec4fb64257220c40e41fca2e53d6 /mod
parentdb30a2342ceecbaed0b72e02d37422700b0d588a (diff)
downloadvolse-hubzilla-76e56fd44e4a8b43bdf42fae64484e5bb69dd450.tar.gz
volse-hubzilla-76e56fd44e4a8b43bdf42fae64484e5bb69dd450.tar.bz2
volse-hubzilla-76e56fd44e4a8b43bdf42fae64484e5bb69dd450.zip
begin work on relocation conversation
Diffstat (limited to 'mod')
-rw-r--r--mod/dfrn_notify.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php
index 64b5ec479..90d2e4004 100644
--- a/mod/dfrn_notify.php
+++ b/mod/dfrn_notify.php
@@ -154,6 +154,31 @@ function dfrn_notify_post(&$a) {
$feed->enable_order_by_date(false);
$feed->init();
+ $reloc = $feed->get_feed_tags( NAMESPACE_DFRN, 'relocate' );
+ if(isset($reloc[0]['child'][NAMESPACE_DFRN])) {
+ $base = $reloc[0]['child'][NAMESPACE_DFRN];
+ $newloc = array();
+ $newloc['uid'] = $importer['importer_uid'];
+ $newloc['cid'] = $importer['id'];
+ $newloc['name'] = notags(unxmlify($base['name'][0]['data']));
+ $newloc['photo'] = notags(unxmlify($base['photo'][0]['data']));
+ $newloc['url'] = notags(unxmlify($base['url'][0]['data']));
+ $newloc['request'] = notags(unxmlify($base['request'][0]['data']));
+ $newloc['confirm'] = notags(unxmlify($base['confirm'][0]['data']));
+ $newloc['notify'] = notags(unxmlify($base['notify'][0]['data']));
+ $newloc['poll'] = notags(unxmlify($base['poll'][0]['data']));
+ $newloc['site-pubkey'] = notags(unxmlify($base['site-pubkey'][0]['data']));
+ $newloc['pubkey'] = notags(unxmlify($base['pubkey'][0]['data']));
+ $newloc['prvkey'] = notags(unxmlify($base['prvkey'][0]['data']));
+
+ // TODO
+ // merge with current record, current contents have priority
+ // update record, set url-updated
+ // update profile photos
+ // schedule a scan?
+
+ }
+
// handle friend suggestion notification
$sugg = $feed->get_feed_tags( NAMESPACE_DFRN, 'suggest' );