forked from GNUsocial/gnu-social
Save notice-to-status mapping in its own table
Introduce a table mapping notices to Twitter statuses. Initialize this table at checkSchema() time. Save the mapping when we push or pull statuses. Use the table to determine if a notice has a Twitter equivalent.
This commit is contained in:
@@ -280,6 +280,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon
|
||||
array('repeat_of' => $original->id,
|
||||
'uri' => $statusUri));
|
||||
common_log(LOG_INFO, "Saved {$repeat->id} as a repeat of {$original->id}");
|
||||
Notice_to_status::saveNew($repeat->id, $status->id);
|
||||
return $repeat;
|
||||
}
|
||||
}
|
||||
@@ -338,6 +339,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon
|
||||
Event::handle('EndNoticeSave', array($notice));
|
||||
}
|
||||
|
||||
Notice_to_status::saveNew($notice->id, $status->id);
|
||||
$notice->blowOnInsert();
|
||||
|
||||
return $notice;
|
||||
|
Reference in New Issue
Block a user