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
..
2020-04-28 15:59:39 +05:30
2019-11-29 15:49:08 +00:00
2020-08-21 11:36:53 +08:00
2020-10-27 23:42:33 +05:30
2020-10-27 23:42:33 +05:30
2019-10-21 12:08:20 +01:00
2019-05-13 15:24:24 +01:00
2020-05-05 13:46:57 +10:00
2020-09-01 13:41:04 +05:30
2020-09-01 13:41:04 +05:30
2020-09-01 13:41:04 +05:30
2020-12-02 19:08:59 +05:30
2020-12-02 12:36:41 +05:30
2020-10-27 23:42:33 +05:30
2020-10-27 23:42:33 +05:30
2020-10-27 23:42:33 +05:30
2020-10-27 23:42:33 +05:30
2020-04-28 15:59:39 +05:30
2020-10-27 23:42:33 +05:30
2019-10-17 16:58:22 +11:00
2020-10-27 23:42:33 +05:30