2017-04-04 22:27:23 +00:00
|
|
|
# A discussion on merge request or commit diffs consisting of `DiffNote` notes.
|
2017-04-06 15:05:57 +00:00
|
|
|
#
|
|
|
|
# A discussion of this type can be resolvable.
|
2017-03-10 01:29:11 +00:00
|
|
|
class DiffDiscussion < Discussion
|
2017-03-31 00:38:21 +00:00
|
|
|
include DiscussionOnDiff
|
2017-03-10 01:29:11 +00:00
|
|
|
|
2017-04-06 15:05:57 +00:00
|
|
|
def self.note_class
|
|
|
|
DiffNote
|
|
|
|
end
|
|
|
|
|
2017-03-31 00:38:21 +00:00
|
|
|
delegate :position,
|
|
|
|
:original_position,
|
2017-03-10 01:29:11 +00:00
|
|
|
|
|
|
|
to: :first_note
|
|
|
|
|
|
|
|
def legacy_diff_discussion?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def reply_attributes
|
2017-03-31 00:38:21 +00:00
|
|
|
super.merge(
|
|
|
|
original_position: original_position.to_json,
|
|
|
|
position: position.to_json,
|
|
|
|
)
|
2017-03-10 01:29:11 +00:00
|
|
|
end
|
|
|
|
end
|