discourse/app
Krzysztof Kotlarek e4d51e5b0a
FIX: correct link in the notification about moved post (#11399)
Notification is created by a job. If the job is evaluated before changes are committed to a database, a notification will have an incorrect URL.

Therefore, the job should be lodged in enqueue_jobs method which is triggered after the transaction:

```ruby
Topic.transaction do
  move_posts_to topic
end
add_allowed_users(participants) if participants.present? && @move_to_pm
enqueue_jobs(topic)
```

I improved a little bit specs to ensure that the destination topic_id is set. However, that tests are passing even without code improvements. I couldn't find an easy way to "delay" database transaction.

Meta: https://meta.discourse.org/t/bug-with-notifications-for-moved-posts/168937
2020-12-04 08:43:42 +11:00
..
assets FIX: Load .js files from plugins in qunit testing env (#11304) 2020-12-03 10:25:42 -06:00
controllers DEV: Make it easier to customize omniauth login complete handler in plugins (#11403) 2020-12-03 22:27:55 +01:00
helpers UX: Use appropriate logo on static pages (#11211) 2020-11-12 10:50:55 -08:00
jobs FEATURE: silently close topic (#11392) 2020-12-03 10:43:19 +11:00
mailers FIX: Ensure group SMTP and message builder always uses from address for Reply-To when IMAP is enabled (#11037) 2020-10-28 07:01:58 +10:00
models FIX: correct link in the notification about moved post (#11399) 2020-12-04 08:43:42 +11:00
serializers FEATURE: Allow Category Group Moderators to edit topic titles (#11340) 2020-12-02 17:21:59 -05:00
services FEATURE: silently close topic (#11392) 2020-12-03 10:43:19 +11:00
views Move CSS link tags above JS in the head 2020-11-17 09:57:30 -05:00