ChannelMessage

- Added status field
- Added required methods
This commit is contained in:
Tristan B. Velloza Kildaire 2023-11-21 13:52:22 +02:00
parent 9dadb5aec9
commit f48e95887f
1 changed files with 23 additions and 0 deletions

View File

@ -75,6 +75,8 @@ public final class ChannelMessage : Command
// TODO: Add mime-type here
private string data;
private Status status;
this()
{
registerClass!(typeof(this));
@ -117,6 +119,27 @@ public final class ChannelMessage : Command
{
return data;
}
public ChannelMessage messageDelivered()
{
return setStatus(Status.GOOD);
}
public ChannelMessage setStatus(Status status)
{
this.status = status;
return this;
}
public Status getStatus()
{
return this.status;
}
public bool wasDelivered()
{
return getStatus() == Status.GOOD;
}
}