10534 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan
7c61dbaf0d
Bump version to v3.5.0.beta2 2025-03-26 10:17:58 +08:00
Osama Sayegh
1a4e09a23e
UX: Apply changes live when editing currently active palette (#31874)
When editing a color palette via the new page introduced in
https://github.com/discourse/discourse/pull/31742, it should apply the
color changes for the admin making the change automatically upon save.

Internal topic: t/148628/12.
2025-03-25 06:42:23 +03:00
Régis Hanol
558c566ca8
FIX: avatar, profile & card backgrounds url in DiscourseConnect (#31956)
The URLs returned by DiscourseConnect for the user's avatar, profile and
card backgrounds were not always correctly handling CDN.

This make use of the `GlobalPath.full_cdn_url` helper method which has
been battle-tested.

Ref - https://meta.discourse.org/t/-/356599
2025-03-24 16:23:05 +01:00
Natalie Tay
af03873d37
DEV: Allow loading topic associations on /categories (#31954)
`/categories` sometimes returns accompanying topics under certain site
settings. The `CategoryList` currently allows preloading for topic
custom fields via `preloaded_topic_custom_fields`, but not for topics
themselves.

This addition is required for
https://github.com/discourse/discourse-solved/pull/342.
2025-03-24 17:40:15 +08:00
Régis Hanol
ea632d705c
DEV: Add guardian argument to TopicsFilter plugin callback (#31908)
This adds the `guardian` argument to the `TopicsFilter` plugin callback
so that plugin can guard their topics filter based on the current user.
2025-03-24 10:34:04 +01:00
Gary Pendergast
b77d0f7589
FEATURE: Sync Reviewable Status (#31901)
When multiple admins are working in the review queue, it's quite easy for two people to try and handle the same reviewable at the same time. This change addresses the two major situations where this can occur.

The `ReviewableClaimedTopic` model has been extended to allow the system to mark a reviewable as claimed as soon as the first moderator starts handling the reviewable, even when the `reviewable_claiming` setting is disabled. This ensures that reviewable actions with client-site activity (for example, `agree_and_suspend`) will lock the reviewable before another moderator starts working on it.

When someone handles handles a reviewable, we now use `MessageBus` to inform other moderators that it's changed. If any of the other moderator have that reviewable open (either individually, or on the list screen), it will automatically refresh that data.
2025-03-24 14:27:18 +11:00
Osama Sayegh
7bd534bcfb
FIX: Make dark mobile logo fallback to dark desktop logo (#31953)
Currently, the light version of mobile logo falls back to the desktop
version if the mobile version isn't set. It makes sense to have the same
fallback rule for the dark version as well, i.e. if there's no dark
mobile logo, use the dark desktop logo.

Internal topic: t/150316.
2025-03-21 18:49:12 +03:00
Osama Sayegh
f7f7642ae0
UX: Improve naming for anonymous mode settings (#31832)
This PR renames a couple of settings related to anonymous mode:

1. `allow_anonymous_posting` → `allow_anonymous_mode`. This setting is
used as a switch for the entire anonymous mode feature, so it makes
sense to give it a generic name that better reflects what the setting
does.
2. `allow_anonymous_likes` → `allow_likes_in_anonymous_mode`. The new
name is clearer and will match a new setting that we'll add to allow
anonymous users to post in chat.

Internal topic: t/148088.
2025-03-21 04:54:06 +03:00
Kevin Hwang
0cdbd40866
FIX: Increase uploads.origin column length to 2000 to accommodate longer S3 pre-signed URLs for user uploads. (#31803)
The current limit is too small for the way Discourse currently stores a
pre-signed S3 URL for each upload in the form of:

```
https://{bucketname}.s3.dualstack.{region}.amazonaws.com/original/1X/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=XXXXXXXXXXXXXXXXXXXX%2FYYYYMMDD%2F{region}%2Fs3%2Faws4_request&X-Amz-Date=YYYYMMDDTHHMMSSZ&X-Amz-Expires=xxxxxx&X-Amz-SignedHeaders=host&X-Amz-Security-Token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

The problem here is that this URL, without the S3 bucket name and AWS
region portion of the URL, is already nearly 1000 chars long.

If you have an even slightly longer bucket name or region, it will
easily go over 1000.

---

The more proper fix would be not to store these "template" S3 pre-signed
URLs in the `origin` column to begin with.

S3 pre-signed URLs aren't meant to be persisted (they're by nature
"one-time" use, scoped to a short window), and they have to be
re-generated for each user request anyway, because they have a maximum
validity of 7d (in practice Discourse generates them with a lifetime of
300s), so the value stored in the `origin` column is more of a
"template" that gets discarded and a real pre-signed URL generated
on-the-fly each time a user comes anyway. So the value in the `origin`
column isn't even doing anything.

The proper way would be to store the S3 bucket name, region, and object
key, which is compact, and the three pieces of info from which it is
sufficient to generate pre-signed URLs each time a user requests.
2025-03-20 09:05:35 +08:00
Loïc Guitaut
2ed31fea64 DEV: Upgrade the Redis gem to v5.4 2025-03-19 14:34:00 +01:00
Bianca Nenciu
e0a4adb224
FIX: Safely restart Sidekiq when mem usage is high (#31883)
This commit changes the way Sidekiq is restarted when memory limit is
exceeded. The HUP signal was replaced with TERM, as mentioned in the
official documentation. The stopping timeout has been set to 10 seconds
to account for the Sidekiq timeout (5 seconds) and another for it
shutdown cleanly (5 more seconds).

See https://github.com/sidekiq/sidekiq/wiki/Deployment.
2025-03-19 11:47:28 +02:00
Ted Johansson
1cde30e6bd
FIX: Don't error out after destroying first post with webhook configured (#31902)
When hard deleting a first post by passing force_destroy: true as an option to PostDestroyer, the post/topic is correctly deleted, and the staff record is created, but the app then errors out.

This only happens on sites with a topic_destroyed webhook setup.

After deleting the record, we pass the topic's ID to TopicView, which then raises an error because it can not load it from the DB.

TopicView supports being initialized with either an ID or an already instantiated record. Since we still have the record in memory after deleting, we can pass that to TopicView.
2025-03-19 16:30:27 +08:00
Krzysztof Kotlarek
622d681f96
FIX: twitter_summary_large_image is renamed to x (#31870)
In this PR x_summary_large_image was introduced but now updated in all
places.

Also `min_first_post_typing_time` deprecation should not be removed.
2025-03-19 11:55:11 +11:00
David Taylor
9e7384298b
DEV: Introduce postcss minmax transform (#31885)
This will auto-transform media query range syntax like `width < 100px`
into the more-widely-supported min/max-width syntax
2025-03-18 19:28:52 +00:00
Ted Johansson
1a7303a35e
FIX: Amend broken group automatic member dialog (#31854)
When creating or editing a group, we are meant to show a dialog telling the admin how many members will be automatically added.
2025-03-18 19:37:37 +08:00
Gary Pendergast
6cd282eeb3
FEATURE: Display a toast popup after completing a review action. (#31786)
When performing an action in the review queue, this change makes two improvements:

- The buttons on the reviewable item are disabled, so you can't accidentally multi-click.
- A toast is displayed when the action is complete, as a success indication.
2025-03-18 11:26:59 +11:00
Alan Guo Xiang Tan
4816bceaf6
DEV: Correct log level when logging in Demon::Base (#31853)
This commit updates the log level for certain log messages to the
approporiate level for the severity of the message being logged.
2025-03-18 08:12:47 +08:00
David Taylor
06b7b4981f
DEV: Improve color-definition stylesheet failure mode (#31858)
- Raise exception in dev/test environments
- Include a clue about the failure via a comment in production mode
2025-03-17 14:04:26 +00:00
Martin Brennan
327375abee
FIX: Use theme screenshot names in theme fields (#31852)
Currently we allow for 2 theme screenshots to be specified,
with a lightweight spec to allow both a light and dark
version of the screenshot. However, we were not storing this
screenshot name anywhere, so we would not be able to use it
for light/dark switching.

This commit fixes that issue, and also does some general refactoring
around theme screenshots, and adds more tests.
2025-03-17 15:56:19 +10:00
Alan Guo Xiang Tan
02b8aa6096
DEV: Protection for migrations that creates index concurrently take 2 (#31792)
This is a follow up to 6820622467ab3613e824f0cb6219def2a575bc1d.

This commit addresses migrations that uses `remove_index` with the
`if_exists: true` option to drop an existing index before creating an
index using the `concurrently` option.

This commit also reruns two migration which may have caused indexes to
be left in an `invalid` state.

### Reviewers Note

Plugin tests are failing due to
https://github.com/discourse/discourse-translator/pull/251
2025-03-17 08:25:30 +08:00
Ted Johansson
3165992a90
DEV: Destroy posts rake task enhancements (#31739)
This improves the new rake task to bulk delete posts based on feedback:

- Honour the `can_permanently_delete` site setting.
- Fix a warning about a scope order no being applied due to batching.
- Fix an issue where double delete would result in duplicate user
histories.
2025-03-14 13:20:43 +08:00
Osama Sayegh
f87e5aab0b
UX: Tweaks to the theme/component pages when using admin sidebar (#30953)
There are a number of minor changes in this commit :

1. Combine the "Themes" and "Components" links in the admin sidebar into
a single tab labelled "Themes and components"
2. The combined tab links to the `/admin/config/customize/themes` page
(titled as "Themes and components")
3. Add a new "Components" tab to the "Themes and components" page.
There's already an existing "Themes" tab
4. Add a "back to" link at the top of individual theme/component page to
navigate back to the respective tab in the "Themes and components" page
5. Remove the themes/components list/sidebar that currently serves for
navigating between themes/components
6. Remove the header in the theme/component page

Changes 4–6 apply only if the admin sidebar is enabled; they have no
effect otherwise.

Internal topic: t/146006.
2025-03-13 15:34:17 +03:00
Alan Guo Xiang Tan
6820622467
DEV: Add protection for migrations that creates index concurrently (#31763)
This commit updates `Migration::SafeMigrate` to protect against unsafe
ways of adding a Postgres index concurrently.

Per postgres documentation:

If a problem arises while scanning the table, such as a deadlock or a
uniqueness violation in a unique index,
the CREATE INDEX command will fail but leave behind an "invalid" index.
This index will be ignored for querying
purposes because it might be incomplete; however it will still consume
update overhead. The recommended recovery
method in such cases is to drop the index and try again to perform
CREATE INDEX CONCURRENTLY .

Therefore, the simplest way for us to ensure that migrations that create
indexes concurrently are idempotent is to follow postgres'
recommendation of dropping the index first before trying to create the
index concurrently.
2025-03-13 09:34:14 +08:00
Penar Musaraj
897b043f01
DEV: Add code comments around oauth user-api-key/new handling (#31774)
Followup to #31759
2025-03-12 14:01:20 -04:00
Penar Musaraj
38ba191be0
FIX: Ensure auth completes correctly when going via /user-api-key/new for new users (#31759)
A new user joining a community via DiscourseHub and logging in via oauth
goes through this process. This would break down for two reasons.

Reason 1: in some cases, especially on Safari mobile, the redirect in
the omniauth callback was happening too early. A new user may not be
signed in yet by that point, which means the redirect to
`/user-api-key/new` triggers a redirect to `/login` which ends up in a
bit of an infinite loop. Not all browsers exhibited this behaviour, but
Safari definitely did.

Reason 2: `/user-api-key/new` is gated via group membership using the
`user_api_key_allowed_groups` site setting. By default that is set to
include `trust_level_0`, however, auto group assignment wasn't taking
place for all user `create` events (only some that go through staged
users).
2025-03-12 11:58:59 -04:00
Martin Brennan
cf4d80d0b3
FIX: Notification email CTA by system user (#31726)
Followup https://github.com/discourse/discourse/pull/31505/

When sending notification emails for system user responses for PMs,
we removed the part of the CTA where it says "to respond to xyz" in a
previous commit.

This commit takes it slightly further -- we now only show a "Visit
Topic"
or "Visit Message" button if the PM notification is from a system user,
it's a bit cleaner.

This commit also adds more in-depth tests, and refactors the message
builder a little.
2025-03-12 13:49:12 +10:00
Loïc Guitaut
3dbbb940de DEV: Upgrade Sidekiq to v7.3.9 2025-03-10 15:02:48 +01:00
Bianca Nenciu
1404a169ca
FIX: Zlib may raise BufError during asset:precompile (#31398)
According to Zlib documentation, this is not a fatal error. In this case
we attempt to deflate the asset three times before giving up.

Sprockets will be replaced in the long term and this is an acceptable fix.
2025-03-07 09:08:06 +02:00
Ted Johansson
e87bfad23b
Revert "DEV: Replace Rinku native gem with PrettyText" (#31692)
Reverts discourse/discourse#31557

This is causing excessive spacing due to the addition of empty `<p>`
tags. Revert first while we fix that.
2025-03-07 12:01:22 +10:00
Martin Brennan
245fc89dc0
FIX: Authenticated x.com oneboxes failing (#31690)
Fixes the same issue that
e9387e238c
did for twitter.com, but for x.com. Since they redirect
on our first FinalDestination call with onebox, the request
fails even with `twitter_consumer_secret` and `twitter_consumer_key`
settings set.
2025-03-07 11:18:02 +10:00
Arkshine
dc9269eee5
FEATURE: Handle youtube live url format (#31673)
Meta:
https://meta.discourse.org/t/youtube-autoembeds-for-live-streams/350920

This PR supports YouTube live URLs, such as:
`https://www.youtube.com/live/eJemwqO0SDw`.


![image](https://github.com/user-attachments/assets/b7e57857-5676-4dcf-862e-1e4b4e594009)

![image](https://github.com/user-attachments/assets/f5e6f2d0-a158-41c6-bc20-0642868dbef8)
2025-03-06 15:43:38 -03:00
Kelv
305039b1c3
DEV: ensure Rails application default headers are present in responses (#31619)
Follow up from https://github.com/discourse/discourse/pull/31559.

We expect some standard headers to be added from
`Rails.application.config.action_dispatch.default_headers` for
responses, however these were found to be removed in some error paths. 
For more detail on this behaviour, refer to https://github.com/discourse/discourse/pull/31619#issuecomment-2699644232.

This PR adds those headers back if they aren't there, with the caveats
that we don't add headers that are irrelevant for non-HTML responses,
and neither do we add X-Frame-Options which is intentionally removed for
embeddables.
2025-03-05 13:19:09 +08:00
Martin Brennan
223b40de1c
FEATURE: Store composer version and device info on post stat (#31600)
We are developing our new composer, and it would be useful
if we could know how posts are being created by members.

To this end, we are going to start storing the following
on post_stats, which are created at the same time as a post
is created:

* writing_device - Based on `BrowserDetection.device`, which in
  turn is based on user agent. Will store .e.g iphone, android,
  mac, windows etc.
* writing_user_agent - Stores the full user agent (truncated at
  400 chars) of the device/browser the member used to write the post.
* composer_version - Either `1` for our old composer, or
  `2` if the new rich composer is enabled in site settings and
  the user has toggled it on
2025-03-05 12:48:32 +10:00
Ted Johansson
828fcb1ad3
DEV: Add rake task to bulk delete posts (#31642)
Same as #31576, but in that one I added some support files that turned out to be unnecessary and broke the build. So this is the re-do. 🙏
2025-03-05 09:31:23 +08:00
Ted Johansson
7d4e4e9422
Revert "DEV: Add rake task to bulk delete posts" (#31607)
Breaks the build. Need to update the spec.
2025-03-04 20:54:03 +08:00
Ted Johansson
42c4427cb1
DEV: Add rake task to bulk delete posts (#31576)
This PR adds a destroy:posts rake task that can be used to hard-delete a list of posts. Useful for dealing with large amounts of spam that has been soft deleted and needs to go.

Notes:

Works on both non-deleted and soft-deleted posts. (We might want to change this to work on only soft-deleted posts?)
Works exclusively on post IDs. We can't mix topic and post IDs as they might clash, and we have no way of resolving that ambiguity.
Accepts either a rake-style array of IDs or, more conveniently, you can pipe the argument in through STDIN.
Added a confirmation step since it's a fairly destructive operation.
2025-03-04 17:29:38 +08:00
Ted Johansson
06a0108a52
DEV: Store selected API key scope mode in the database table (#31601)
Currently, after creating an API key, there is no way in the UI to see what scope the key has. To do this we need to first store the selected scope mode when creating a new key.

In this PR we:

- Convert scope_mode from a transient attribute to a database backed enum.
- Ship the possible values through the javascript:update_constants rake task instead of hard coding in front-end.

In follow-up PRs we will:

- Backfill existing API keys based on their associated api_key_scopes records.
- Start showing the scope mode in the UI.
2025-03-04 16:41:43 +08:00
Gary Pendergast
9abeff460c
FEATURE: Display the Watched Words that caused a post to be flagged. (#31435)
When a post is flagged due to matching watched words, it can be difficult to know what you're looking for, particularly if you have a lot of watched words built up over a long period of time.

This change stores the list of matched words, and later displays them in the review queue, listing which Watched Words were responsible for the flag. Because watched words can change, this is recorded at the time the post is flagged. For posts that were flagged prior to this feature landing, it tries to guess the relevant words based on the current Watched Words set.
2025-03-04 17:22:12 +11:00
Krzysztof Kotlarek
dbba838ef4
FEATURE: rebranded admin logos settings (#31554)
Redesigned page to update site logos. `AdminBrandingLogoFormComponent`
is attached to the old logos page and the new branding page. In the next
steps, branding will replace the logos page.

A new `AdminConfigAreaCardSection` component was added hidden and less
frequently used settings.

An image placeholder was also needed because many additional logos have
a fallback to the site logo.

Finally, `twitter_summary_large_image` was renamed to
`x_summary_large_image`.

Desktop
![localhost_4200_admin_config_branding
(4)](https://github.com/user-attachments/assets/b6ae5266-72f6-4582-b0ef-4d05545943e8)


Mobile
![localhost_4200_admin_config_branding(iPhone 12 Pro)
(3)](https://github.com/user-attachments/assets/bf329a5c-9ba0-4d88-b30d-e8f1feb02e31)
2025-03-04 12:51:27 +11:00
Jarek Radosz
024d752083
DEV: Remove extraneous rubocop arguments (#31596)
1. `--parallel` is the default
2. it runs in the current directory by default
2025-03-04 01:28:26 +01:00
Blake Erickson
98cdfa33c3
DEV: Create plugin outlet for console site setting logging (#31564)
This change allows plugins to customize the description for site setting
logs that occur via site setting changes via the rails console.
2025-03-03 10:27:03 -07:00
Loïc Guitaut
b9dd9c70a5 DEV: Migrate Sidekiq to a dedicated Redis DB
As we’re currently using a namespace for Sidekiq, in order to upgrade to
the latest version, we need to drop it as it’s not supported anymore.

The recommended way is to use a different Redis DB for Sidekiq.

This patch uses a different config for Sidekiq and also takes care of
migrating existing jobs (in queues and the retry and scheduled sets).
2025-03-03 15:42:26 +01:00
Joffrey JAFFEUX
d38acc5df1
DEV: discourse-emojis gem (#31408)
This commit moves most of emoji logic into the discourse-emojis gem:
https://github.com/discourse/discourse-emojis/

Most notably:
- images are now symlinked from the gem
- the gem provides path to the json files

Search aliases have also been made asynchronous and memoized. When you
will search for an emoji we will now load the aliases and store the list
for future use.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2025-03-03 13:09:08 +01:00
Kelv
0d90f6e3c3
FIX: cross origin opener policy should apply to public error responses (#31559)
In some error paths, headers that were set earlier can get overwritten
(e.g. `Cross-Origin-Opener-Policy`) by middleware such as
ActionDispatch::ShowExceptions.

This PR sets the `Cross-Origin-Opener-Policy` header to the value of the
SiteSetting `cross_origin_opener_policy_header` if it's missing and if
the response is for HTML.

In future, this DefaultHeaders middleware can be used to set other
default headers that relate to security or other purposes.

### Testing
<img width="631" alt="test"
src="https://github.com/user-attachments/assets/05106a40-2bc7-435d-91a2-4dd2a098f349"
/>
2025-03-03 17:04:24 +08:00
Gary Pendergast
8615fc6cbb
DEV: Add a user agent to all HTTP requests that Discourse makes. (#31555)
This change standardises the `User-Agent` header that Discourse will send when talking to other sites.

`Discourse.user_agent` is now the authority on what the user agent value should be. For Onebox requests, this changes the user agent from their existing value to match the new value (unless overridden).

For all other requests, `Net::HTTPHeader` is monkey-patched to add a default `User-Agent` header when one hasn't been provided.
2025-03-03 16:32:25 +11:00
Martin Brennan
8325d42e56
FEATURE: Experimental admin search refinements round 1 (#31441)
Followup e26a1175d7c33746bddbc858ad89e68cc14beefe

Adds extra functionality and tests for the admin search modal.

* Show third level plugin config pages in search, e.g.  AI Usage
* Remember last used search filters
* Allow navigating search results with keyboard, using tab or up/down
and enter to go to result
* Add a placeholder beneath search input to tell the admin what to do
* Add a full page search at `/admin/search` which can be reached from
pressing Enter on the search input
* Add specs for modal and full page search
* Change admin sidebar filter "no results found" to point to full page
search
* Add keyboard shortcut help to modal for admin search
2025-03-03 13:56:07 +10:00
Ted Johansson
258dfab8d7
DEV: Replace Rinku native gem with PrettyText (#31557)
We have a native dependency, Rinku, that's used only to make links in one place. We can get rid of this and use PrettyText instead.

This is almost a one-for-one replacement, but PrettyText adds rel="noopener nofollow ugc" to external links, which I suspect is actually what we want. It also wraps the result in a <p> tag, which we strip out for parity with Rinku.
2025-03-03 09:19:17 +08:00
Ted Johansson
39f4485939
FIX: Don't attach images that aren't rendered in the digest e-mail (#31525)
When secure uploads are enabled, we need to send images that are rendered in the digest e-mail as attachments. Before this change, we would indiscriminately attach all images in the relevant topic's first post, whether they were rendered the e-mail body or not.

This change fixes that by only attaching images that are referenced in the e-mail body.
2025-02-27 11:41:17 +08:00
Martin Brennan
ed1543455d
FIX: Allow oneboxes with no description (#31518)
This behaviour was allowed in
cb82dce86a
but then inexplicably removed a few months later in
https://github.com/discourse/onebox/pull/448, but showing
title-only oneboxes is valid. The original Meta topic that
this was discussed in was
https://meta.discourse.org/t/abc-news-not-oneboxing-due-to-missing-description/155933
.

This commit re-introduces allowing this behaviour to avoid the need for
a plugin,
c.f. https://meta.discourse.org/t/allow-title-only-onebox/354306

For example
<https://en-americas-support.nintendo.com/app/answers/detail/a_id/67660>

This commit also unhides onebox descriptions in chat, it's not
clear why they were ever hidden in the first place
2025-02-26 13:16:51 +10:00
Penar Musaraj
f498c3b3e8
FIX: do not add _pm suffix to locale key when email is from system user (#31505)
See
https://meta.discourse.org/t/email-footer-says-visit-message-to-respond-to-no-names-after-to/354359

There may be a deeper root issue somewhere further up the stack, but
this change ensures we always use the `visit_link_to_respond` locale key
when the PM is from `system`. Seems cleaner than copy that says `to
respond to system`.

Before

![CleanShot 2025-02-25 at 10 38
44@2x](https://github.com/user-attachments/assets/ef12a957-72f7-418e-a109-448384e32def)

After

![CleanShot 2025-02-25 at 10 38
25@2x](https://github.com/user-attachments/assets/d8359812-63c5-444a-b36a-75a2e0bcfbb0)
2025-02-25 11:37:52 -05:00