<?php

namespace Api\Model\Languageforge\Lexicon;

use Api\Model\Shared\Mapper\ObjectForEncoding;

class LexCommentReply extends ObjectForEncoding
{
    public function __construct($content = '')
    {
        $this->content = $content;
        $this->id = uniqid();
        $this->authorInfo = new LexAuthorInfo();
        $this->isDeleted = false;
    }

    /** @var LexAuthorInfo */
    public $authorInfo;

    /** @var string */
    public $content;

    /** @var string */
    public $id;

    /** @var boolean */
    public $isDeleted;
}

<?php

namespace Api\Model\Languageforge\Lexicon;

use Api\Model\Shared\Mapper\ObjectForEncoding;

class LexCommentReply extends ObjectForEncoding
{
    public function __construct($content = '')
    {
        $this->content = $content;
        $this->id = uniqid();
        $this->authorInfo = new LexAuthorInfo();
        $this->isDeleted = false;
    }

    /** @var LexAuthorInfo */
    public $authorInfo;

    /** @var string */
    public $content;

    /** @var string */
    public $id;

    /** @var string */
    public $guid;

    /** @var boolean */
    public $isDeleted;
}

Fix comment replies being duplicated during S/R
Fix comment replies being duplicated during S/R

Turns out it was quite simple: the reply GUIDs weren't being tracked by
PHP and sent to the Javascript frontend, so when the frontend created a
new reply and updated the entire list of replies, it sent a list with no
GUIDs in it. Simply keeping track of the reply GUIDs in PHP is enough to
get rid of this bug.
