diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-08-15 09:56:45 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-08-15 09:56:45 -0400 |
commit | e8388d1d9b3055a68a97551f2718380fcaee320b (patch) | |
tree | 2b28407f4847327c72c587ff4d8b1f1560126804 /indra/newview/scripts/lua/test_group_chat.lua | |
parent | b3fb23ee0c6d33f5eba3502328ffb0011b5f25fb (diff) | |
parent | 8324ef8edf68c074f4d30322d37b091b3ea10539 (diff) |
Merge branch 'release/luau-scripting' into viewer-lua-2237
Diffstat (limited to 'indra/newview/scripts/lua/test_group_chat.lua')
-rw-r--r-- | indra/newview/scripts/lua/test_group_chat.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/test_group_chat.lua b/indra/newview/scripts/lua/test_group_chat.lua new file mode 100644 index 0000000000..eaff07ed14 --- /dev/null +++ b/indra/newview/scripts/lua/test_group_chat.lua @@ -0,0 +1,15 @@ +LLChat = require 'LLChat' +LLAgent = require 'LLAgent' +popup = require 'popup' + +local OK = 'OK_okcancelbuttons' +local GROUPS = LLAgent.getGroups() + +-- Choose one of the groups randomly and send group message +math.randomseed(os.time()) +group_info = GROUPS[math.random(#GROUPS)] +LLChat.startGroupChat(group_info.id) +response = popup:alertYesCancel('Started group chat with ' .. group_info.name .. ' group. Send greetings?') +if next(response) == OK then + LLChat.sendGroupIM('Greetings', group_info.id) +end |