diff options
| author | Andrey Lihatskiy <andreylproductengine@lindenlab.com> | 2016-01-11 19:59:41 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <andreylproductengine@lindenlab.com> | 2016-01-11 19:59:41 +0200 |
| commit | 86ee5d92fcacf2fd55706a987c224b83c28f326b (patch) | |
| tree | 557bd40efa4261f12b75b45c86bda718249634a6 /indra/llui/llnotifications.cpp | |
| parent | c9c6966364ba59171313ec179b8b19f920ea6888 (diff) | |
| parent | e5887ad1d9385ba980b58e4c0ad78337fec451ab (diff) | |
Merged in andreyl_productengine/viewer-lion-marchcat (pull request #16)
MAINT-6018 [SECURITY] Open URL dialog spam
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); |
