mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-08-29 01:08:59 +00:00
ADD - bridge message NUI events
This commit is contained in:
@@ -43,6 +43,12 @@ local server_callbacks = {
|
||||
"calls:answer",
|
||||
"calls:decline",
|
||||
"calls:hangup",
|
||||
"messages:conversations",
|
||||
"messages:thread",
|
||||
"messages:send",
|
||||
"messages:media",
|
||||
"messages:delete",
|
||||
"messages:gifs",
|
||||
}
|
||||
|
||||
local function get_locale()
|
||||
@@ -283,6 +289,17 @@ RegisterNetEvent("sky_phone:calls:changed", function()
|
||||
SendNUIMessage({ type = "calls:changed" })
|
||||
end)
|
||||
|
||||
RegisterNetEvent("sky_phone:messages:changed", function(data)
|
||||
SendNUIMessage({ type = "messages:changed", data = data })
|
||||
end)
|
||||
|
||||
RegisterNetEvent("sky_phone:messages:new", function(data)
|
||||
local messages_locale = get_locale().Nui.Apps.messages
|
||||
data.title = messages_locale.name
|
||||
data.text = messages_locale.newMessage:gsub("{sender}", tostring(data.sender))
|
||||
SendNUIMessage({ type = "messages:new", data = data })
|
||||
end)
|
||||
|
||||
RegisterNetEvent("sky_phone:call:incoming", function(data)
|
||||
notification_focus = true
|
||||
SetNuiFocus(true, true)
|
||||
|
||||
Reference in New Issue
Block a user