git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 0fb68192 authored by Evan Prodromou's avatar Evan Prodromou

Add direct messages to backup

parent 96d7b68c
......@@ -72,8 +72,10 @@ class UserActivityStream extends AtomUserNoticeFeed
$subscribers = $this->getSubscribers();
$groups = $this->getGroups();
$faves = $this->getFaves();
$messagesFrom = $this->getMessagesFrom();
$messagesTo = $this->getMessagesTo();
$objs = array_merge($subscriptions, $subscribers, $groups, $faves, $notices);
$objs = array_merge($subscriptions, $subscribers, $groups, $faves, $notices, $messagesFrom, $messagesTo);
$subscriptions = null;
$subscribers = null;
......@@ -332,6 +334,20 @@ class UserActivityStream extends AtomUserNoticeFeed
return $groups;
}
function getMessagesTo()
{
$msgMap = Memcached_DataObject::listGet('Message', 'to_profile', array($this->user->id));
return $msgMap[$this->user->id];
}
function getMessagesFrom()
{
$msgMap = Memcached_DataObject::listGet('Message', 'from_profile', array($this->user->id));
return $msgMap[$this->user->id];
}
function writeJSON($handle)
{
require_once INSTALLDIR.'/lib/activitystreamjsondocument.php';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment