File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -361,7 +361,8 @@ module ::DiscourseActivityPub
361
361
end
362
362
end
363
363
on ( :post_edited ) do |post , topic_changed , post_revisor |
364
- if post . activity_pub_full_topic && post_revisor . topic_title_changed?
364
+ if post . activity_pub_full_topic && post_revisor . topic_title_changed? &&
365
+ post . topic . activity_pub_object
365
366
post . topic . activity_pub_object . name = post . topic . activity_pub_name
366
367
post . topic . activity_pub_object . save!
367
368
end
Original file line number Diff line number Diff line change 140
140
end
141
141
end
142
142
end
143
+
144
+ context "when revising a non-activity-pub post" do
145
+ context "with full_topic enabled" do
146
+ before { toggle_activity_pub ( category , publication_type : "full_topic" ) }
147
+ it "allows updating the topic title" do
148
+ new_title = "New topic title"
149
+ expect { post_revisor . revise! ( user , title : new_title ) } . not_to raise_error
150
+ end
151
+ end
152
+ end
143
153
end
144
154
end
You can’t perform that action at this time.
0 commit comments