summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrion Vibber <brion@status.net>2010-08-10 13:36:38 -0700
committerBrion Vibber <brion@status.net>2010-08-10 13:49:11 -0700
commit08fc6053ec55e911b842fd05dafc5e0c99c4e992 (patch)
tree7db0277c84f0f6a7e75b5fb63d8b21dad95c6488 /lib
parent4fdfc6b1ce7e5ffa50b24bdddca55cc73d54a09f (diff)
Fix for regression with OStatus mention processing (duplicated new and old style lead to trying to save a reply entry twice).
Diffstat (limited to 'lib')
-rw-r--r--lib/activitycontext.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/activitycontext.php b/lib/activitycontext.php
index 5afbb7fd2..09a457924 100644
--- a/lib/activitycontext.php
+++ b/lib/activitycontext.php
@@ -71,6 +71,7 @@ class ActivityContext
$links = $element->getElementsByTagNameNS(ActivityUtils::ATOM, ActivityUtils::LINK);
+ $attention = array();
for ($i = 0; $i < $links->length; $i++) {
$link = $links->item($i);
@@ -80,11 +81,12 @@ class ActivityContext
// XXX: Deprecate this in favour of "mentioned" from Salmon spec
// http://salmon-protocol.googlecode.com/svn/trunk/draft-panzer-salmon-00.html#SALR
if ($linkRel == self::ATTENTION) {
- $this->attention[] = $link->getAttribute(self::HREF);
+ $attention[] = $link->getAttribute(self::HREF);
} elseif ($linkRel == self::MENTIONED) {
- $this->attention[] = $link->getAttribute(self::HREF);
+ $attention[] = $link->getAttribute(self::HREF);
}
}
+ $this->attention = array_unique($attention);
}
/**