forked from GNUsocial/gnu-social
Inbox class a bit more consistent in argument order and type
This commit is contained in:
@@ -50,13 +50,13 @@ class TweetInQueueHandler extends QueueHandler
|
||||
|
||||
$importer = new TwitterImport();
|
||||
$notice = $importer->importStatus($status);
|
||||
if ($notice) {
|
||||
if ($notice instanceof Notice) {
|
||||
$flink = Foreign_link::getByForeignID($receiver, TWITTER_SERVICE);
|
||||
if ($flink) {
|
||||
if ($flink instanceof Foreign_link) {
|
||||
common_log(LOG_DEBUG, "TweetInQueueHandler - Got flink so add notice ".
|
||||
$notice->id." to inbox ".$flink->user_id);
|
||||
// @fixme this should go through more regular channels?
|
||||
Inbox::insertNotice($flink->user_id, $notice->id);
|
||||
Inbox::insertNotice($notice, $flink->user_id);
|
||||
}else {
|
||||
common_log(LOG_DEBUG, "TweetInQueueHandler - No flink found for foreign user ".$receiver);
|
||||
}
|
||||
|
@@ -170,9 +170,9 @@ $stream->hookEvent('status', function($data, $context) {
|
||||
$importer = new TwitterImport();
|
||||
printf("\timporting...");
|
||||
$notice = $importer->importStatus($data);
|
||||
if ($notice) {
|
||||
if ($notice instanceof Notice) {
|
||||
global $myuser;
|
||||
Inbox::insertNotice($myuser->id, $notice->id);
|
||||
Inbox::insertNotice($notice, $myuser->id);
|
||||
printf(" %s\n", $notice->id);
|
||||
} else {
|
||||
printf(" FAIL\n");
|
||||
|
Reference in New Issue
Block a user