"Edited" is shown when transforming a comment to discussion

When transforming notes to discussions, the updated_at column is updated so that polling clients properly receive the transformed note.

This has the unintended effect of marking the note as "Edited".

Also, resolving a note marks it as "Edited". This may not be the intended behavior too.

We should only show the "Edited" line when the note body was actually edited.

Proposed Solution

As a first iteration, we can hide the "Edited" line when updated_by is nil.

updated_by is set when the note body is edited so we could show the "Edited" line based on this.

Future iteration

The timestamp used for the "Edited" line (e.g. "Edited 3 days ago by...") is still based on updated_at.

So when an edited comment (which has updated_by set) is transformed / resolved, the timestamp is bumped. This means the UI would show "Edited now by ..." even if it was just transformed / resolved.

And it would be wrong to say that it was edited recently by the user in updated_by too because that user may not be the one transforming / resolving the comment.

Edited by Heinrich Lee Yu