Feature Request: Add a notification when receiving items from Marketplace

Turn this off with LiruReceivedItemsNotify
This commit is contained in:
Lirusaito
2019-03-23 08:38:59 -04:00
parent 1cc7c6b4cf
commit bd39b29c1d
2 changed files with 12 additions and 0 deletions

View File

@@ -1087,6 +1087,17 @@ Changing this setting only affects new text.</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>LiruReceivedItemsNotify</key>
<map>
<key>Comment</key>
<string>Whether or not to spawn a notification in addition to the chat message when you receive items from the marketplace.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>OBJExportNotifyFailed</key>
<map>
<key>Comment</key>

View File

@@ -2263,6 +2263,7 @@ void translate_if_needed(std::string& message)
message = LLTrans::getString(gift ? "ReceivedGift" : "ReceivedPurchase",
gift ? LLSD().with("USER", match[1].str()).with("PRODUCT", match[2].str()).with("MESSAGE", match[3].str())
: LLSD().with("PRODUCT", match[1].str()));
if (gSavedSettings.getBOOL("LiruReceivedItemsNotify")) LLNotificationsUtil::add("SystemMessage", LLSD().with("MESSAGE", message));
}
}