Skip to content

Commit 1eff5bb

Browse files
committed
Remove unnecessary data from comment
1 parent fddda21 commit 1eff5bb

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

models/conversations/comment.go

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ type Comment struct {
135135
ConversationID int64 `xorm:"INDEX"`
136136
Conversation *Conversation
137137

138-
DependentConversationID int64 `xorm:"INDEX"`
139-
140138
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
141139
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
142140

@@ -166,39 +164,6 @@ func (c *Comment) LoadPoster(ctx context.Context) (err error) {
166164
return err
167165
}
168166

169-
// Creates conversation dependency comment
170-
func createConversationDependencyComment(ctx context.Context, doer *user_model.User, conversation, dependentConversation *Conversation, add bool) (err error) {
171-
cType := CommentTypeAddDependency
172-
if !add {
173-
cType = CommentTypeRemoveDependency
174-
}
175-
if err = conversation.LoadRepo(ctx); err != nil {
176-
return err
177-
}
178-
179-
// Make two comments, one in each conversation
180-
opts := &CreateCommentOptions{
181-
Type: cType,
182-
Doer: doer,
183-
Repo: conversation.Repo,
184-
Conversation: conversation,
185-
DependentConversationID: dependentConversation.ID,
186-
}
187-
if _, err = CreateComment(ctx, opts); err != nil {
188-
return err
189-
}
190-
191-
opts = &CreateCommentOptions{
192-
Type: cType,
193-
Doer: doer,
194-
Repo: conversation.Repo,
195-
Conversation: dependentConversation,
196-
DependentConversationID: conversation.ID,
197-
}
198-
_, err = CreateComment(ctx, opts)
199-
return err
200-
}
201-
202167
// LoadReactions loads comment reactions
203168
func (c *Comment) LoadReactions(ctx context.Context, repo *repo_model.Repository) (err error) {
204169
if c.Reactions != nil {

services/conversation/conversation.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ func deleteConversation(ctx context.Context, conversation *conversations_model.C
8181
&conversations_model.CommentReaction{ConversationID: conversation.ID},
8282
&repo_model.Attachment{ConversationID: conversation.ID},
8383
&conversations_model.Comment{ConversationID: conversation.ID},
84-
&conversations_model.Comment{DependentConversationID: conversation.ID},
8584
); err != nil {
8685
return err
8786
}

0 commit comments

Comments
 (0)