Files
PolyTraderSharp/libs/Threema-MsgApi-Net-Core/IcgSoftware.Threema.CoreMsgApi/Messages/TextMessage.cs
T
bergmandClaude Opus 4.8 475d396f80 Baseline: Ausgangszustand vor Modularisierung
Erster Commit des bestehenden monolithischen WinForms-Copytraders,
inklusive der Alt-Backups (*.bak), damit diese dauerhaft in der
Historie rekonstruierbar bleiben. Threema-Lib unter libs/ wurde
vendored (nested .git entfernt).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:16:16 +02:00

40 lines
730 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IcgSoftware.Threema.CoreMsgApi.Messages
{
/// <summary>
/// A text message that can be sent/received with end-to-end encryption via Threema.
/// </summary>
public class TextMessage : ThreemaMessage
{
public const int TYPE_CODE = 0x01;
private readonly string text;
public TextMessage(String text)
{
this.text = text;
}
public string Text { get { return text; } }
public override int GetTypeCode() {
return TYPE_CODE;
}
public override byte[] GetData()
{
return Encoding.UTF8.GetBytes(text);
}
public override string ToString()
{
return text;
}
}
}