FIX: Missing link to deleted post in /my/deleted-posts (#31342)

## 🔍 Overview
A regression in https://github.com/discourse/discourse/pull/30604,
resulted in the title/link for deleted posts not being shown. This fix
ensures that the title is once again shown.

## 📸 Screenshots

### ← Before
![Screenshot 2025-02-13 at 14 14
08](https://github.com/user-attachments/assets/17da8119-e476-4458-bc19-3f55efac91b2)

### → After
![Screenshot 2025-02-13 at 14 13
42](https://github.com/user-attachments/assets/ba2389ba-6cad-4641-a2cb-d2a13c10c233)
This commit is contained in:
Keegan George 2025-02-14 09:50:42 -08:00 committed by GitHub
parent b01d4b1951
commit f76d88063d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 1 deletions

View File

@ -21,7 +21,7 @@ export default class UserDeletedPosts extends DiscourseRoute {
model.content.forEach((item) => { model.content.forEach((item) => {
if (item.title) { if (item.title) {
item.set("title", emojiUnescape(escapeExpression(item.title))); item.set("titleHtml", emojiUnescape(escapeExpression(item.title)));
} }
}); });
} }

View File

@ -26,4 +26,11 @@ acceptance("User's deleted posts page", function (needs) {
.dom(".user-stream-item [data-topic-id='34']") .dom(".user-stream-item [data-topic-id='34']")
.hasText("Another topic's text"); .hasText("Another topic's text");
}); });
test("Displays the posts with the correct links", async function (assert) {
await visit(`/u/eviltrout/deleted-posts`);
assert
.dom(".user-stream-item .title")
.hasText("Localization of UI elements");
});
}); });

View File

@ -32,6 +32,7 @@ export default {
can_wiki: true, can_wiki: true,
read: true, read: true,
user_title: null, user_title: null,
title: "Private message to you",
actions_summary: [ actions_summary: [
{ {
id: 3, id: 3,
@ -92,6 +93,7 @@ export default {
can_delete: false, can_delete: false,
can_recover: true, can_recover: true,
user_title: null, user_title: null,
title: "Localization of UI elements",
raw: "Any plans to support localization of UI elements, so that I (for example) could set up a completely German speaking forum?", raw: "Any plans to support localization of UI elements, so that I (for example) could set up a completely German speaking forum?",
actions_summary: [ actions_summary: [
{ id: 2, count: 0, hidden: false, can_act: true }, { id: 2, count: 0, hidden: false, can_act: true },