DirectMessages backed up properly for UAS

This commit is contained in:
Mikael Nordfeldth 2015-02-13 11:54:15 +01:00
parent 44191ac81a
commit e9457db8b2

View File

@ -63,7 +63,9 @@ class DirectMessagePlugin extends Plugin
if (!empty($uas->after)) { if (!empty($uas->after)) {
$messages = array_filter($messages, array($uas, 'createdAfter')); $messages = array_filter($messages, array($uas, 'createdAfter'));
} }
$objs[] = $messages; foreach ($messages as $message) {
$objs[] = clone($message);
}
// Messages _to_ the user // Messages _to_ the user
$msgMap = Message::listGet('to_profile', array($uas->getUser()->id)); $msgMap = Message::listGet('to_profile', array($uas->getUser()->id));
@ -71,7 +73,9 @@ class DirectMessagePlugin extends Plugin
if (!empty($uas->after)) { if (!empty($uas->after)) {
$messages = array_filter($messages, array($uas, 'createdAfter')); $messages = array_filter($messages, array($uas, 'createdAfter'));
} }
$objs[] = $messages; foreach ($messages as $message) {
$objs[] = clone($message);
}
return true; return true;
} }