discourse/app/models
Mark VanLandingham 415abe6491
FIX: Correctly place moderator post for full topic move with freeze_original (#30324)
When freeze_original option is passed to PostMover, and we are moving all posts there is an issue. We attempt to put the small_action right after the last moved post. The issue is when there is an existing small action after the last moved "real" post. We then try to put the moderator post at the same location of the existing small action, which causes an index conflict and the move fails.

This makes sure that we place the moderator post at the verrrrrry end of the topic :)
2024-12-17 10:31:34 -06:00
..
concerns Build(deps-dev): Bump rubocop from 1.68.0 to 1.69.0 (#29947) 2024-11-27 01:51:01 +01:00
about.rb FEATURE: Enable the new /about page for everyone (#29390) 2024-10-29 18:40:11 +03:00
admin_dashboard_data.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
admin_dashboard_general_data.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
admin_dashboard_index_data.rb
admin_notice.rb
allowed_pm_user.rb FEATURE: Allow List for PMs (#10270) 2020-07-20 15:23:49 -06:00
anonymous_user.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
api_key_scope.rb
api_key.rb
application_request.rb DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
associated_group.rb
auto_track_duration_site_setting.rb
backup_draft_post.rb FEATURE: experimental hidden setting for draft backups 2019-10-17 16:58:21 +11:00
backup_draft_topic.rb
backup_file.rb
backup_location_site_setting.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
backup_metadata.rb DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893) 2023-02-13 12:39:45 +08:00
badge_grouping.rb DEV: Set limits for text fields on BadgeGrouping 2023-05-15 09:54:54 +02:00
badge_type.rb
badge.rb DEV: update more deprecated font awesome icon names (#30123) 2024-12-05 15:20:02 +08:00
base_font_setting.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
bookmark.rb Dev fix some types (#29547) 2024-11-01 19:19:25 +02:00
category_and_topic_lists.rb
category_custom_field.rb DEV: Add true_fields method for CustomFields (#24876) 2023-12-14 11:06:21 -06:00
category_featured_topic.rb
category_form_template.rb
category_group.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
category_list.rb FEATURE: Paginate categories when there are many (#29569) 2024-11-11 17:32:45 +02:00
category_moderation_group.rb FEATURE: Support designating multiple groups as mods on category (#28655) 2024-09-04 04:38:46 +03:00
category_page_style.rb FEATURE: Paginate categories when there are many (#29569) 2024-11-11 17:32:45 +02:00
category_required_tag_group.rb
category_search_data.rb
category_setting.rb
category_tag_group.rb
category_tag_stat.rb
category_tag.rb
category_user.rb FIX: more performance improvement for PostAlert job (#22487) 2023-07-13 09:02:23 +10:00
category.rb DEV: Bump rubocop_discourse (#29608) 2024-11-06 06:27:49 +08:00
child_theme.rb
color_scheme_color.rb
color_scheme_setting.rb
color_scheme.rb
custom_emoji.rb FEATURE: Add creator and logging for CustomEmoji (#28004) 2024-07-22 14:44:49 +08:00
developer.rb
digest_email_site_setting.rb
directory_column.rb DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
directory_item.rb FIX: Remove anonymous users from users directory (#28892) 2024-09-13 15:12:57 +03:00
discourse_connect.rb DEV: Ignore normalize_emails when using SSO (#29890) 2024-11-25 11:55:27 +08:00
discourse_version_check.rb
dismissed_topic_user.rb
do_not_disturb_timing.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
draft_sequence.rb FIX: Destroy Drafts when increasing sequences (#27739) 2024-07-10 10:43:11 +03:00
draft.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
email_change_request.rb
email_level_site_setting.rb
email_log.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
email_style.rb
email_token.rb
embeddable_host_tag.rb
embeddable_host.rb
embedding.rb
emoji_set_site_setting.rb
emoji.rb FIX: Sanitization issue when replacing default emoji with custom emoji that contains or ~/Discourse/discourse symbols (#30053) 2024-12-03 19:27:12 -05:00
external_upload_stub.rb DEV: Improve external upload debugging (#28627) 2024-08-30 10:25:04 +10:00
flag.rb FIX: use a custom prefix for custom flags (#28839) 2024-09-11 15:30:20 +10:00
form_template.rb FIX: Form template limit validation (#28791) 2024-09-10 08:11:44 -07:00
given_daily_like.rb
global_setting.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
group_archived_message.rb
group_associated_group.rb
group_category_notification_default.rb
group_custom_field.rb
group_history.rb DEV: Update to lastest rubocop-discourse 2024-05-27 18:06:14 +02:00
group_mention.rb
group_request.rb
group_tag_notification_default.rb FIX: Error when moving the group default notification state (#28910) 2024-09-13 16:01:20 -03:00
group_user.rb DEV: Make more group-based settings client: false (#25585) 2024-02-08 09:43:34 +10:00
group.rb FEATURE: Support designating multiple groups as mods on category (#28655) 2024-09-04 04:38:46 +03:00
ignored_user.rb
imap_sync_log.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
incoming_domain.rb
incoming_email.rb
incoming_link.rb DEV: Update to lastest rubocop-discourse 2024-05-27 18:06:14 +02:00
incoming_links_report.rb
incoming_referer.rb
invite_redeemer.rb DEV: Update to lastest rubocop-discourse 2024-05-27 18:06:14 +02:00
invite.rb
invited_group.rb
invited_user.rb
javascript_cache.rb
like_notification_frequency_site_setting.rb
linked_topic.rb FEATURE: new setting to create a linked topic on autoclosing mega topics (#11001) 2020-11-02 12:18:48 +05:30
locale_site_setting.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
mailing_list_mode_site_setting.rb
moved_post.rb DEV: add full_move to MovedPost record small_action modifier (#30236) 2024-12-12 11:47:14 -06:00
muted_user.rb
navigation_menu_site_setting.rb
new_topic_duration_site_setting.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
notification_level_when_replying_site_setting.rb
notification.rb DEV: Drop old notification id columns (#28550) 2024-10-15 11:58:57 +03:00
oauth2_user_info.rb
onceoff_log.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
optimized_image.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
permalink.rb FIX: Permalink.create didn't work as expected anymore (#29895) 2024-11-22 21:11:26 +01:00
plugin_store_row.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
plugin_store.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
post_action_type.rb FIX: flaky flags system spec (#29039) 2024-10-08 08:38:42 +11:00
post_action.rb FIX: serialize Flags instead of PostActionType (#28362) 2024-08-14 12:13:46 +10:00
post_analyzer.rb
post_custom_field.rb
post_detail.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
post_hotlinked_media.rb DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
post_mover.rb FIX: Correctly place moderator post for full topic move with freeze_original (#30324) 2024-12-17 10:31:34 -06:00
post_reply_key.rb
post_reply.rb
post_revision.rb DEV: Enable Rails 7.1 defaults 2024-08-12 10:41:13 +02:00
post_search_data.rb
post_stat.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
post_stripper.rb FIX: user got notified about a mention inside a chat message quote (#24229) 2023-11-08 23:13:25 +04:00
post_timing.rb DEV: Update to lastest rubocop-discourse 2024-05-27 18:06:14 +02:00
post.rb FIX: update flag reason message with default value (#30026) 2024-12-04 14:46:52 +11:00
previous_replies_site_setting.rb
private_message_topic_tracking_state.rb
problem_check_tracker.rb FIX: Avoid duplicate problem admin notices (#29329) 2024-10-22 11:17:27 +08:00
problem_check.rb FIX: Make problem check tracker unique constraint work on PG13 (#29272) 2024-10-21 10:45:09 +08:00
published_page.rb DEV: Prefer \A and \z over ^ and $ in regexes (#19936) 2023-01-20 12:52:49 -06:00
push_subscription.rb
quoted_post.rb
redelivering_webhook_event.rb FEATURE: Add Mechanism to redeliver all failed webhook events (#27609) 2024-07-08 15:43:16 -05:00
remote_theme.rb DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
remove_muted_tags_from_latest_site_setting.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
report.rb FIX: Blank "Legacy Pageviews" report showed no data (#29502) 2024-10-31 12:51:29 +10:00
reviewable_claimed_topic.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
reviewable_flagged_post.rb DEV: Add "delete user" options to illegal flag review (#29956) 2024-11-27 17:23:57 +08:00
reviewable_history.rb DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
reviewable_post.rb DEV: Add "delete user" options to illegal flag review (#29956) 2024-11-27 17:23:57 +08:00
reviewable_priority_setting.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
reviewable_queued_post.rb DEV: Add "delete user" options to illegal flag review (#29956) 2024-11-27 17:23:57 +08:00
reviewable_score.rb FEATURE: Reason and deleted content support in the review queue (#30295) 2024-12-17 11:44:46 +11:00
reviewable_sensitivity_setting.rb
reviewable_user.rb DEV: Add "delete user" options to illegal flag review (#29956) 2024-11-27 17:23:57 +08:00
reviewable.rb FEATURE: Reason and deleted content support in the review queue (#30295) 2024-12-17 11:44:46 +11:00
s3_region_site_setting.rb
screened_email.rb
screened_ip_address.rb
screened_url.rb DEV: Prefer \A and \z over ^ and $ in regexes (#19936) 2023-01-20 12:52:49 -06:00
search_log.rb DEV: Add search_log modifier to prevent search log logging (#28279) 2024-08-08 12:41:10 -05:00
search_sort_order_site_setting.rb
shared_draft.rb
shelved_notification.rb DEV: Drop old notification id columns (#28550) 2024-10-15 11:58:57 +03:00
sidebar_section_link.rb
sidebar_section.rb
sidebar_url.rb FEATURE: Add invite link to the sidebar (#29448) 2024-10-30 05:31:14 +03:00
single_sign_on_record.rb DEV: Increases external avatar url limit (#28893) 2024-09-13 01:08:01 +02:00
site_setting.rb DEV: Modernize admin emoji JavaScript (#29714) 2024-11-19 15:44:34 +08:00
site.rb
sitemap.rb
skipped_email_log.rb
slug_setting.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
stat.rb FEATURE: Enable the new /about page for everyone (#29390) 2024-10-29 18:40:11 +03:00
stylesheet_cache.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
summarization_strategy.rb DEV: Remove summarization code (#27373) 2024-07-02 08:51:47 -07:00
tag_group_membership.rb
tag_group_permission.rb
tag_group.rb SECURITY: Fixes for main (#28137) 2024-07-30 14:19:01 +08:00
tag_search_data.rb
tag_user.rb DEV: Ensure unique notification level per tag user (#28638) 2024-09-03 15:43:02 +08:00
tag.rb FIX: Include permissions in the tag serializer (#27849) 2024-07-11 19:59:57 +03:00
theme_field.rb FIX: Rescue ActiveRecord::ReadOnlyError when baking theme field (#29776) 2024-11-15 10:19:10 +08:00
theme_modifier_set.rb FIX: Invalid raise syntax (#29364) 2024-10-23 11:40:14 +02:00
theme_setting.rb FEATURE: theme_modifiers can depend on theme settings (plus serialize_post_user_badges) (#29227) 2024-10-17 15:16:16 +01:00
theme_settings_migration.rb DEV: Introduce run_theme_migration spec helper in test environment (#26845) 2024-05-03 06:29:18 +08:00
theme_svg_sprite.rb
theme_translation_override.rb
theme.rb DEV: Compile theme raw-hbr to modules (#30299) 2024-12-16 17:31:49 +00:00
top_lists.rb
top_menu_item.rb
top_topic.rb FIX: Don't error out on nested top topic period param (#29275) 2024-10-21 10:44:43 +08:00
topic_allowed_group.rb
topic_allowed_user.rb
topic_converter.rb
topic_custom_field.rb
topic_embed.rb FIX: topic embed blank tags or passed with nil do not blank out existing topic tags (#27699) 2024-07-03 14:50:59 -07:00
topic_featured_users.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
topic_group.rb
topic_hot_score.rb DEV: Trigger an event after updating topic hot scores (#29261) 2024-10-18 11:08:48 -03:00
topic_invite.rb
topic_link_click.rb
topic_link.rb FEATURE: support silent internal links (#25472) 2024-01-30 17:03:58 +11:00
topic_list.rb
topic_notifier.rb
topic_participant_groups_summary.rb FEATURE: display PM participant group names in the topics list. (#21677) 2023-05-31 19:32:06 +05:30
topic_participants_summary.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
topic_poster.rb
topic_posters_summary.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
topic_search_data.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
topic_tag.rb
topic_thumbnail.rb
topic_timer.rb
topic_tracking_state.rb DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
topic_user.rb DEV: Publish DiscourseEvent in TopicUser.track_visit for first visit (#27975) 2024-07-19 10:53:12 -05:00
topic_view_item.rb DEV: Fix flaky request tracker system spec (#29136) 2024-10-09 07:53:08 +08:00
topic_view_stat.rb
topic.rb DEV: Allow freeze_original argument in topics controller & JS transformer (#30120) 2024-12-05 08:31:05 -06:00
translation_override.rb DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
trust_level_and_staff_and_disabled_setting.rb
trust_level_and_staff_setting.rb
trust_level_setting.rb
trust_level3_requirements.rb
unsubscribe_key.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
upload_reference.rb
upload.rb Revert "FEATURE: Mark bad uploads with :invalid_url (#29640)" (#29657) 2024-11-08 13:04:52 +08:00
user_action.rb
user_api_key_client_scope.rb Require permitted scopes when registering a client (#29718) 2024-11-19 15:28:04 -05:00
user_api_key_client.rb Require permitted scopes when registering a client (#29718) 2024-11-19 15:28:04 -05:00
user_api_key_scope.rb
user_api_key.rb Add dedicated user_api_key_clients table to allow for 1:many use cases (#28119) 2024-11-08 12:05:03 -05:00
user_archived_message.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
user_associated_account.rb
user_associated_group.rb
user_auth_token_log.rb
user_auth_token.rb FIX: store information about the login method in the database. (#28054) 2024-07-24 17:19:58 +10:00
user_avatar.rb DEV: ensure rebaking works even when some users have inconsistent data (#30261) 2024-12-16 19:48:25 +08:00
user_badge.rb FEATURE: Show when a badge has been granted for a post (#29696) 2024-12-03 13:43:27 +11:00
user_badges.rb
user_bookmark_list.rb
user_custom_field.rb FIX: Searchable user fields do not always have an integer name (#30223) 2024-12-17 11:06:19 +11:00
user_email.rb DEV: ensure rebaking works even when some users have inconsistent data (#30261) 2024-12-16 19:48:25 +08:00
user_export.rb
user_field_option.rb
user_field.rb DEV: Modernize admin user fields (#29843) 2024-11-25 11:54:43 +08:00
user_history.rb FIX: filterable staff logs for flags (#29695) 2024-11-12 11:23:18 +11:00
user_ip_address_history.rb
user_notification_schedule.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
user_open_id.rb
user_option.rb DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
user_password.rb FIX: setting new password should reset password_expired_at (#29296) 2024-10-21 07:24:43 +08:00
user_profile_view.rb
user_profile.rb DEV: Update to lastest rubocop-discourse 2024-05-27 18:06:14 +02:00
user_required_fields_version.rb FEATURE: User fields required for existing users - Part 2 (#27172) 2024-06-25 19:32:18 +08:00
user_search_data.rb
user_search.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
user_second_factor.rb
user_security_key.rb
user_stat.rb
user_status.rb
user_summary.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
user_upload.rb
user_visit.rb
user_warning.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
user.rb DEV: Add index to users.ip_address 2024-11-15 11:17:07 -05:00
username_validator.rb DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
watched_word_group.rb SECURITY: limit the number of characters in watched word replacements. 2024-07-15 19:25:17 +08:00
watched_word.rb SECURITY: limit the number of characters in watched word replacements. 2024-07-15 19:25:17 +08:00
web_crawler_request.rb DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893) 2023-02-13 12:39:45 +08:00
web_hook_event_type.rb DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
web_hook_event_types_hook.rb
web_hook_event.rb FEATURE: Add Mechanism to redeliver all failed webhook events (#27609) 2024-07-08 15:43:16 -05:00
web_hook_events_daily_aggregate.rb FIX: Division by zero error on WebHookEventsDailyAggregate (#27667) 2024-07-01 15:40:52 -03:00
web_hook.rb DEV: Delete plugin specific webhook event types (#29374) 2024-10-24 11:02:58 -05:00