fix(admin): Melder-Nachricht grammatisch korrekt (zum Beitrag/Profil)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c678c4cf27
commit
81e617ece5
3 files changed
+8
-8
No files matched your search
@@ -62,7 +62,7 @@ describe("admin.dismissReport reporter feedback", () => {
|
||||
expect(mockSendTeamMessage).toHaveBeenCalledTimes(1);
|
||||
const [, petId, body] = mockSendTeamMessage.mock.calls[0];
|
||||
expect(petId).toBe("reporter-1");
|
||||
expect(body).toContain("den Beitrag von Bubi");
|
||||
expect(body).toContain("Meldung zum Beitrag von Bubi");
|
||||
expect(body).toContain("keinen Verstoß");
|
||||
expect(body).toContain("Begründung: Das ist ein normales Spielvideo.");
|
||||
expect(mockPrisma.moderationLog.create).toHaveBeenCalledWith(
|
||||
@@ -80,7 +80,7 @@ describe("admin.dismissReport reporter feedback", () => {
|
||||
await caller.admin.dismissReport({ reportId: "r2" });
|
||||
|
||||
const body = mockSendTeamMessage.mock.calls[0][2] as string;
|
||||
expect(body).toContain("das Profil von Luna");
|
||||
expect(body).toContain("Meldung zum Profil von Luna");
|
||||
expect(body).not.toContain("Begründung");
|
||||
});
|
||||
|
||||
@@ -122,7 +122,7 @@ describe("admin.deleteReportedPost reporter feedback", () => {
|
||||
expect(mockPrisma.report.deleteMany).toHaveBeenCalledWith({ where: { targetPostId: "post-1" } });
|
||||
expect(mockSendTeamMessage.mock.calls.map((c) => c[1])).toEqual(["reporter-1", "reporter-2"]);
|
||||
const body = mockSendTeamMessage.mock.calls[0][2] as string;
|
||||
expect(body).toContain("den Beitrag von Bubi");
|
||||
expect(body).toContain("Meldung zum Beitrag von Bubi");
|
||||
expect(body).toContain("Inhalt entfernt");
|
||||
// Die interne Lösch-Begründung geht nicht an den Melder.
|
||||
expect(body).not.toContain("Gewaltdarstellung");
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
const SIGNATURE = "Bei Fragen antworte einfach auf diese Nachricht. Dein PawFeed-Team";
|
||||
|
||||
/** „den Beitrag von Bubi“ / „das Profil von Bubi“ — Fallback ohne Namen, falls das Ziel nicht mehr existiert. */
|
||||
/** „zum Beitrag von Bubi“ / „zum Profil von Bubi“ — Fallback ohne Namen, falls das Ziel nicht mehr existiert. */
|
||||
export function describeReportTarget(kind: "post" | "pet", targetPetName: string | null): string {
|
||||
const noun = kind === "post" ? "den Beitrag" : "das Profil";
|
||||
const noun = kind === "post" ? "zum Beitrag" : "zum Profil";
|
||||
return targetPetName ? `${noun} von ${targetPetName}` : noun;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ export function reportDismissedMessage(target: string, reason: string): string {
|
||||
const trimmedReason = reason.trim();
|
||||
const reasonPart = trimmedReason ? `\n\nBegründung: ${trimmedReason}` : "";
|
||||
return (
|
||||
`Hallo, danke für deine Meldung zu ${target}. Wir haben sie geprüft und ` +
|
||||
`Hallo, danke für deine Meldung ${target}. Wir haben sie geprüft und ` +
|
||||
`keinen Verstoß gegen unsere Community-Richtlinien festgestellt, deshalb bleibt der Inhalt online.` +
|
||||
`${reasonPart}\n\n${SIGNATURE}`
|
||||
);
|
||||
@@ -28,7 +28,7 @@ export function reportDismissedMessage(target: string, reason: string): string {
|
||||
|
||||
export function reportUpheldMessage(target: string): string {
|
||||
return (
|
||||
`Hallo, danke für deine Meldung zu ${target}. Wir haben sie geprüft und den Inhalt entfernt. ` +
|
||||
`Hallo, danke für deine Meldung ${target}. Wir haben sie geprüft und den Inhalt entfernt. ` +
|
||||
`Danke, dass du hilfst, PawFeed sicher und freundlich zu halten!\n\n${SIGNATURE}`
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user