mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-14 07:43:31 -07:00
Undo implementation of exporting forwarded messages for the .csv format
This commit is contained in:
parent
6debb1c825
commit
297396f03a
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -93,28 +92,11 @@ internal partial class CsvMessageWriter(Stream stream, ExportContext context)
|
|||
{
|
||||
await _writer.WriteAsync(CsvEncode(message.GetFallbackContent()));
|
||||
}
|
||||
else if (message.ForwardedMessage is not null)
|
||||
{
|
||||
// For forwarded messages, include the forwarded content
|
||||
var forwardedContent = $"[Forwarded] {message.ForwardedMessage.Content}";
|
||||
await _writer.WriteAsync(
|
||||
CsvEncode(await FormatMarkdownAsync(forwardedContent, cancellationToken))
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
await _writer.WriteAsync(
|
||||
CsvEncode(await FormatMarkdownAsync(message.Content, cancellationToken))
|
||||
);
|
||||
}
|
||||
|
||||
await _writer.WriteAsync(',');
|
||||
|
||||
// Attachments (include forwarded attachments if present)
|
||||
var allAttachments = message.ForwardedMessage is not null
|
||||
? message.Attachments.Concat(message.ForwardedMessage.Attachments).ToList()
|
||||
: message.Attachments;
|
||||
await WriteAttachmentsAsync(allAttachments, cancellationToken);
|
||||
// Attachments
|
||||
await WriteAttachmentsAsync(message.Attachments, cancellationToken);
|
||||
await _writer.WriteAsync(',');
|
||||
|
||||
// Reactions
|
||||
|
|
|
|||
Loading…
Reference in a new issue