summaryrefslogtreecommitdiff
path: root/plugins/OStatus/lib/salmonaction.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-02-24 15:00:52 -0500
committerEvan Prodromou <evan@status.net>2010-02-24 15:00:52 -0500
commitdaea98878692cadc9406be16fe2e15a419add3c4 (patch)
treed7b5e0ec34b04c7f91c43a4e5761dc764c64330a /plugins/OStatus/lib/salmonaction.php
parentf5ec7c27070dac4ac28ba860f4cc9a808b5f7c30 (diff)
parent07214f1370547fcc64db34ce8c8a84ec70e0d5bd (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'plugins/OStatus/lib/salmonaction.php')
-rw-r--r--plugins/OStatus/lib/salmonaction.php50
1 files changed, 1 insertions, 49 deletions
diff --git a/plugins/OStatus/lib/salmonaction.php b/plugins/OStatus/lib/salmonaction.php
index 83cf0b8f8..9aac2ed52 100644
--- a/plugins/OStatus/lib/salmonaction.php
+++ b/plugins/OStatus/lib/salmonaction.php
@@ -185,54 +185,6 @@ class SalmonAction extends Action
function saveNotice()
{
$oprofile = $this->ensureProfile();
-
- // Get (safe!) HTML and text versions of the content
-
- require_once(INSTALLDIR.'/extlib/HTMLPurifier/HTMLPurifier.auto.php');
-
- $html = $this->act->object->content;
-
- $purifier = new HTMLPurifier();
-
- $rendered = $purifier->purify($html);
-
- $content = html_entity_decode(strip_tags($rendered));
-
- $options = array('is_local' => Notice::REMOTE_OMB,
- 'uri' => $this->act->object->id,
- 'url' => $this->act->object->link,
- 'rendered' => $rendered,
- 'replies' => $this->act->context->attention);
-
- if (!empty($this->act->context->location)) {
- $options['lat'] = $location->lat;
- $options['lon'] = $location->lon;
- if ($location->location_id) {
- $options['location_ns'] = $location->location_ns;
- $options['location_id'] = $location->location_id;
- }
- }
-
- if (!empty($this->act->context->replyToID)) {
- $orig = Notice::staticGet('uri',
- $this->act->context->replyToID);
- if (!empty($orig)) {
- $options['reply_to'] = $orig->id;
- }
- }
-
- if (!empty($this->act->time)) {
- $options['created'] = common_sql_date($this->act->time);
- }
-
- $saved = Notice::saveNew($oprofile->profile_id,
- $content,
- 'ostatus+salmon',
- $options);
-
- // Record that this was saved through a validated Salmon source
- // @fixme actually do the signature validation!
- Ostatus_source::saveNew($saved, $oprofile, 'salmon');
- return $saved;
+ return $oprofile->processPost($this->act, 'salmon');
}
}