diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-01-15 16:42:39 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-01-15 16:42:39 -0500 |
commit | 3612d7d14b1e481402bb3d7cbfb552cd19a3fc0a (patch) | |
tree | f3dabe49f7953e24de207a6a0939da5539d5acca /indra/llui/llnotifications.cpp | |
parent | a6c8de97bbb2609d24e212672b192650aed91e1e (diff) | |
parent | 5a5c023e291990a463b1a91846ce82c70da8daab (diff) |
merge
Diffstat (limited to 'indra/llui/llnotifications.cpp')
-rwxr-xr-x | indra/llui/llnotifications.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7e235997d8..77e7d375c8 100755 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1715,6 +1715,30 @@ void LLNotifications::cancelByName(const std::string& name) } } +void LLNotifications::cancelByOwner(const LLUUID ownerId) +{ + std::vector<LLNotificationPtr> notifs_to_cancel; + for (LLNotificationSet::iterator it = mItems.begin(), end_it = mItems.end(); + it != end_it; + ++it) + { + LLNotificationPtr pNotif = *it; + if (pNotif && pNotif->getPayload().get("owner_id").asUUID() == ownerId) + { + notifs_to_cancel.push_back(pNotif); + } + } + + for (std::vector<LLNotificationPtr>::iterator it = notifs_to_cancel.begin(), end_it = notifs_to_cancel.end(); + it != end_it; + ++it) + { + LLNotificationPtr pNotif = *it; + pNotif->cancel(); + updateItem(LLSD().with("sigtype", "delete").with("id", pNotif->id()), pNotif); + } +} + void LLNotifications::update(const LLNotificationPtr pNotif) { LLNotificationSet::iterator it=mItems.find(pNotif); |