FIX: Polymorphic bookmarks for new user narrative bot (#16683)

This commit allows the new user narrative bot to work
with polymorphic bookmarks, gated behind the
use_polymorphic_bookmarks site setting.
This commit is contained in:
Martin Brennan
2022-05-09 16:19:18 +10:00
committed by GitHub
parent 222c8d9b6a
commit 4d0ac8636c
3 changed files with 22 additions and 6 deletions

View File

@ -243,7 +243,6 @@ module DiscourseNarrativeBot
post
end
# TODO (martin) [POLYBOOK] Fix up narrative bot bookmark interactions in a separate PR.
def missing_bookmark
return unless valid_topic?(@post.topic_id)
return if @post.user_id == self.discobot_user.id
@ -254,7 +253,6 @@ module DiscourseNarrativeBot
false
end
# TODO (martin) [POLYBOOK] Fix up narrative bot bookmark interactions in a separate PR.
def reply_to_bookmark
return unless valid_topic?(@post.topic_id)
return unless @post.user_id == self.discobot_user.id