Commit 6c65d763 authored by skummer's avatar skummer

ZP-82

- changed: when SyncMail messages are changed the entire email content is striped by the StreamImporter and only the flags are streamed to the mobile

git-svn-id: https://z-push.org/svn/z-push/trunk@1357 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 4fb62a00
......@@ -101,9 +101,18 @@ class ImportChangesStream implements IImportChanges {
if ($message->flags === false || $message->flags === SYNC_NEWMESSAGE)
$this->encoder->startTag(SYNC_ADD);
else
$this->encoder->startTag(SYNC_MODIFY);
else {
// on update of an SyncEmail we only export the flags
if($message instanceof SyncMail && isset($message->flag) && $message->flag instanceof SyncMailFlags) {
$newmessage = new SyncMail();
$newmessage->flag = $message->flag;
$message = $newmessage;
unset($newmessage);
ZLog::Write(LOGLEVEL_DEBUG, sprintf("ImportChangesStream->ImportMessageChange('%s'): SyncMail message updated. Message content is striped, only flags are streamed.", $id));
}
$this->encoder->startTag(SYNC_MODIFY);
}
$this->encoder->startTag(SYNC_SERVERENTRYID);
$this->encoder->content($id);
$this->encoder->endTag();
......
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