allow custom subjects for notecards
This commit is contained in:
parent
b5b7a9fac6
commit
c410412097
1 changed files with 6 additions and 2 deletions
|
|
@ -120,17 +120,21 @@ namespace SecondBotEvents.Services
|
||||||
client.Self.InstantMessage(avatar, message);
|
client.Self.InstantMessage(avatar, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool SendNotecard(string name, string content, UUID sendToUUID, bool attachDateTime=true)
|
public bool SendNotecard(string name, string content, UUID sendToUUID, bool attachDateTime=true, string subject=null)
|
||||||
{
|
{
|
||||||
bool returnstatus = true;
|
bool returnstatus = true;
|
||||||
if (attachDateTime == true)
|
if (attachDateTime == true)
|
||||||
{
|
{
|
||||||
name = name + " " + DateTime.Now;
|
name = name + " " + DateTime.Now;
|
||||||
}
|
}
|
||||||
|
if (subject == null)
|
||||||
|
{
|
||||||
|
subject = name + " Created via SecondBot notecard API";
|
||||||
|
}
|
||||||
client.Inventory.RequestCreateItem(
|
client.Inventory.RequestCreateItem(
|
||||||
client.Inventory.FindFolderForType(AssetType.Notecard),
|
client.Inventory.FindFolderForType(AssetType.Notecard),
|
||||||
name,
|
name,
|
||||||
name + " Created via SecondBot notecard API",
|
subject,
|
||||||
AssetType.Notecard,
|
AssetType.Notecard,
|
||||||
UUID.Random(),
|
UUID.Random(),
|
||||||
InventoryType.Notecard,
|
InventoryType.Notecard,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue