ChannelMessage

- Added new message type
This commit is contained in:
Tristan B. Velloza Kildaire 2023-11-13 09:53:50 +02:00
parent 6688f0db6a
commit 4c113de94a
1 changed files with 48 additions and 0 deletions

View File

@ -64,4 +64,52 @@ public final class ChannelEnumerateReply : Command
{
return this.channels;
}
}
// NOTE: Can be used for reception AND request (sending)
public final class ChannelMessage : Command
{
private string[] to;
private string from;
// TODO: Add mime-type here
private string data;
this()
{
registerClass!(typeof(this));
}
public void setTo(string[] to)
{
foreach(string curTo; to)
{
this.to ~= curTo;
}
}
public void setTo(string to)
{
this.to ~= to;
}
public string getSingularTo()
{
return this.to[0];
}
public string[] getRecipients()
{
return this.to;
}
public string getFrom()
{
return this.from;
}
public string getMessage()
{
return data;
}
}