ADD - implement DarkChat service

This commit is contained in:
Leon.Schmidt
2026-08-06 21:13:23 +02:00
parent 4ded930845
commit ea2da5729d
6 changed files with 1080 additions and 0 deletions
+33
View File
@@ -76,6 +76,20 @@ local server_callbacks = {
"messages:media",
"messages:delete",
"messages:gifs",
"darkchat:bootstrap",
"darkchat:update-profile",
"darkchat:start",
"darkchat:thread",
"darkchat:send",
"darkchat:media",
"darkchat:react",
"darkchat:message-action",
"darkchat:update-conversation",
"darkchat:add-contact",
"darkchat:remove-contact",
"darkchat:block",
"darkchat:report",
"darkchat:clear",
"gallery:list",
"media:config",
}
@@ -380,6 +394,25 @@ RegisterNetEvent("sky_phone:messages:new", function(data)
SendNUIMessage({ type = "messages:new", data = data })
end)
RegisterNetEvent("sky_phone:darkchat:changed", function(data)
SendNUIMessage({ type = "darkchat:changed", data = data })
end)
RegisterNetEvent("sky_phone:darkchat:new", function(data)
local darkchat_locale = get_locale().Nui.Apps.darkchat
data.title = darkchat_locale.name
if data.notificationMode == "private" then
data.sender = nil
data.text = darkchat_locale.privateNotification
elseif data.notificationMode == "hidden" then
data.sender = nil
data.text = ""
else
data.text = darkchat_locale.newMessage:gsub("{sender}", tostring(data.sender))
end
SendNUIMessage({ type = "darkchat:new", data = data })
end)
RegisterNetEvent("sky_phone:call:incoming", function(data)
notification_focus = true
SetNuiFocus(true, true)