@@ -117,24 +117,24 @@ func (opts *FindReactionsOptions) toConds() builder.Cond {
117117 // If Conversation ID is set add to Query
118118 cond := builder .NewCond ()
119119 if opts .ConversationID > 0 {
120- cond = cond .And (builder.Eq {"reaction .conversation_id" : opts .ConversationID })
120+ cond = cond .And (builder.Eq {"comment_reaction .conversation_id" : opts .ConversationID })
121121 }
122122 // If CommentID is > 0 add to Query
123123 // If it is 0 Query ignore CommentID to select
124124 // If it is -1 it explicit search of Conversation Reactions where CommentID = 0
125125 if opts .CommentID > 0 {
126- cond = cond .And (builder.Eq {"reaction .comment_id" : opts .CommentID })
126+ cond = cond .And (builder.Eq {"comment_reaction .comment_id" : opts .CommentID })
127127 } else if opts .CommentID == - 1 {
128- cond = cond .And (builder.Eq {"reaction .comment_id" : 0 })
128+ cond = cond .And (builder.Eq {"comment_reaction .comment_id" : 0 })
129129 }
130130 if opts .UserID > 0 {
131131 cond = cond .And (builder.Eq {
132- "reaction .user_id" : opts .UserID ,
133- "reaction .original_author_id" : 0 ,
132+ "comment_reaction .user_id" : opts .UserID ,
133+ "comment_reaction .original_author_id" : 0 ,
134134 })
135135 }
136136 if opts .Reaction != "" {
137- cond = cond .And (builder.Eq {"reaction .type" : opts .Reaction })
137+ cond = cond .And (builder.Eq {"comment_reaction .type" : opts .Reaction })
138138 }
139139
140140 return cond
@@ -161,8 +161,8 @@ func FindConversationReactions(ctx context.Context, conversationID int64, listOp
161161func FindReactions (ctx context.Context , opts FindReactionsOptions ) (ReactionList , int64 , error ) {
162162 sess := db .GetEngine (ctx ).
163163 Where (opts .toConds ()).
164- In ("reaction .`type`" , setting .UI .Reactions ).
165- Asc ("reaction .conversation_id" , "reaction .comment_id" , "reaction .created_unix" , "reaction .id" )
164+ In ("comment_reaction .`type`" , setting .UI .Reactions ).
165+ Asc ("comment_reaction .conversation_id" , "comment_reaction .comment_id" , "comment_reaction .created_unix" , "comment_reaction .id" )
166166 if opts .Page != 0 {
167167 sess = db .SetSessionPagination (sess , & opts )
168168
0 commit comments