summaryrefslogtreecommitdiff
path: root/indra/llui/llnotifications.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llnotifications.cpp')
-rw-r--r--indra/llui/llnotifications.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 98718e4de7..dd56f03237 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -196,6 +196,17 @@ bool emptyResponse(const LLSD& payload)
return false;
}
+bool cancelNotification(const LLSD& payload)
+{
+ if (payload["sigtype"].asString() == "add")
+ {
+ // cancel this notification
+ LLNotifications::instance().cancel(LLNotifications::instance().find(payload["id"].asUUID()));
+ }
+ return false;
+}
+
+
namespace LLNotificationFilters
{
// a sample filter
@@ -1252,7 +1263,7 @@ void LLNotifications::createDefaultChannels()
LLNotifications::instance().getChannel("Ignore")->
connectFailedFilter(&handleIgnoredNotification);
LLNotifications::instance().getChannel("VisibilityRules")->
- connectFailedFilter(&emptyResponse);
+ connectFailedFilter(&cancelNotification);
}
bool LLNotifications::addTemplate(const std::string &name,