Removed Inbox from core (unused since 4b2a66ed29)

Added the following FIXME:
How should a Twitter user get their Inbox filled with foreign tweets?

Every imported Twitter user has a profile in the Profile table, so we
could setup a Subscription entry for each of those, meaning they get
collected in the InboxNoticeStream... But this would mean a lot of
unnecessary entries and listings that generally just point to the
locked down Twitter service.

Let's figure out a good relation so we can connect any profile to any
imported foreign notice, so it shows up in the "all" feed.
This commit is contained in:
Mikael Nordfeldth
2014-03-06 04:36:00 +01:00
parent 4b2a66ed29
commit 2272cc244d
10 changed files with 34 additions and 271 deletions

View File

@@ -42,7 +42,6 @@ function main()
fixupNoticeRendered();
fixupNoticeConversation();
initConversation();
initInbox();
fixupGroupURI();
initGroupProfileId();
@@ -198,50 +197,6 @@ function initConversation()
printfnq("DONE.\n");
}
function initInbox()
{
printfnq("Ensuring all users have an inbox...");
$user = new User();
$user->whereAdd('not exists (select user_id from inbox where user_id = user.id)');
$user->orderBy('id');
if ($user->find()) {
while ($user->fetch()) {
try {
$notice = new Notice();
$notice->selectAdd();
$notice->selectAdd('id');
$notice->joinAdd(array('profile_id', 'subscription:subscribed'));
$notice->whereAdd('subscription.subscriber = ' . $user->id);
$notice->whereAdd('notice.created >= subscription.created');
$ids = array();
if ($notice->find()) {
while ($notice->fetch()) {
$ids[] = $notice->id;
}
}
$notice = null;
$inbox = new Inbox();
$inbox->user_id = $user->id;
$inbox->pack($ids);
$inbox->insert();
} catch (Exception $e) {
printv("Error initializing inbox: " . $e->getMessage());
}
}
}
printfnq("DONE.\n");
}
function initGroupProfileId()
{
printfnq("Ensuring all User_group entries have a Profile and profile_id...");