diff --git a/lib/useractivitystream.php b/lib/useractivitystream.php index 59ae6184b3..94eec19c6c 100644 --- a/lib/useractivitystream.php +++ b/lib/useractivitystream.php @@ -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';