mirror of
https://github.com/wassname/talk.git
synced 2026-07-04 21:39:36 +08:00
Add media to comment data downloads (#3089)
This will update the admin and user CSV downloads to include a "Media" column that will specify the media type and the URL for the media content. CORL-1188 Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -85,6 +85,7 @@ export async function sendUserDownload(
|
||||
"Article URL",
|
||||
"Comment URL",
|
||||
"Comment Text",
|
||||
"Media",
|
||||
]);
|
||||
|
||||
/**
|
||||
@@ -109,7 +110,11 @@ export async function sendUserDownload(
|
||||
const body = htmlToText.fromString(revision.body);
|
||||
const commentURL = getURLWithCommentID(story.url, comment.id);
|
||||
|
||||
csv.write([comment.id, createdAt, story.url, commentURL, body]);
|
||||
const media = revision.media
|
||||
? `${revision.media.type}: ${revision.media.url}`
|
||||
: "";
|
||||
|
||||
csv.write([comment.id, createdAt, story.url, commentURL, body, media]);
|
||||
}
|
||||
|
||||
commentBatch = [];
|
||||
|
||||
Reference in New Issue
Block a user