diff options
author | Evan Prodromou <evan@status.net> | 2010-09-08 16:40:37 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-09-08 16:40:37 -0400 |
commit | 42f1ec85eaeaa7d74e823bebef4c8c06e7e159c3 (patch) | |
tree | ce32ad85b9c62aa29bfe2d74ba3a299243785061 /plugins/TwitterBridge/TwitterBridgePlugin.php | |
parent | 255e96d3b5cd86a1e7b4f759e4ab3088b195f005 (diff) |
change the event we use for deleting a linked status on Twitter
Diffstat (limited to 'plugins/TwitterBridge/TwitterBridgePlugin.php')
-rw-r--r-- | plugins/TwitterBridge/TwitterBridgePlugin.php | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php index e641c1009..34b82ef83 100644 --- a/plugins/TwitterBridge/TwitterBridgePlugin.php +++ b/plugins/TwitterBridge/TwitterBridgePlugin.php @@ -408,26 +408,21 @@ class TwitterBridgePlugin extends Plugin } /** - * If a notice gets deleted, remove the Notice_to_status mapping + * If a notice gets deleted, remove the Notice_to_status mapping and + * delete the status on Twitter. * + * @param User $user The user doing the deleting * @param Notice $notice The notice getting deleted * * @return boolean hook value */ - function onNoticeDeleteRelated($notice) + function onStartDeleteOwnNotice(User $user, Notice $notice) { $n2s = Notice_to_status::staticGet('notice_id', $notice->id); if (!empty($n2s)) { - $user = common_current_user(); - - if (empty($user) || $user->id != $notice->profile_id) { - $this->log(LOG_INFO, "Skipping deleting notice for {$notice->id} since it doesn't seem to be by the author."); - return true; - } - $flink = Foreign_link::getByUserID($notice->profile_id, TWITTER_SERVICE); // twitter service |