summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/LLNotification.lua
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-06-20 16:28:47 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-06-20 16:28:47 -0400
commit22ec77c03d01a973c871ae59fd95a8397bf07fb8 (patch)
tree530b30d1dde4ea274566489d42cfd07b2f882167 /indra/newview/scripts/lua/LLNotification.lua
parent09b814a2dc6d3a647d75bcf0a310eba2678a0228 (diff)
parentd7d18aaad0e7b8412e50fd82d446d31611207175 (diff)
Merge branch 'release/luau-scripting' into lua-chat-listener
Diffstat (limited to 'indra/newview/scripts/lua/LLNotification.lua')
-rw-r--r--indra/newview/scripts/lua/LLNotification.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/LLNotification.lua b/indra/newview/scripts/lua/LLNotification.lua
new file mode 100644
index 0000000000..f47730d1cc
--- /dev/null
+++ b/indra/newview/scripts/lua/LLNotification.lua
@@ -0,0 +1,15 @@
+-- Engage the LLNotificationsListener LLEventAPI
+
+leap = require 'leap'
+
+local LLNotification = {}
+
+function LLNotification.add(name, substitutions)
+ leap.send('LLNotifications', {op='requestAdd', name=name, substitutions=substitutions})
+end
+
+function LLNotification.requestAdd(name, substitutions)
+ return leap.request('LLNotifications', {op='requestAdd', name=name, substitutions=substitutions})['response']
+end
+
+return LLNotification