We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74eaa4c commit d06c750Copy full SHA for d06c750
1 file changed
app/models/comment_thread.rb
@@ -92,7 +92,9 @@ def maximum_title_length
92
# @param user [User] user to register as a follower
93
# @return [Boolean] status of the operation
94
def add_follower(user)
95
- ThreadFollower.create(comment_thread: self, user: user)
+ if ThreadFollower.where(comment_thread: self, user: user).none?
96
+ ThreadFollower.create(comment_thread: self, user: user)
97
+ end
98
end
99
100
# Directly bumps the thread's last activity date & time
0 commit comments