mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
updated profile_name to be required on app load
This commit is contained in:
1 parent
44622b8d8a
commit
04ada722f5
6 files changed
+89
-15
No files matched your search
@@ -21,7 +21,6 @@ end
|
||||
|
||||
RegisterNetEvent('phone:fetchTweets')
|
||||
AddEventHandler('phone:fetchTweets', function()
|
||||
print('RegisterNetEvent: phone:fetchTweets')
|
||||
ESX.TriggerServerCallback('phone:fetchTweets', function(tweets)
|
||||
sendTwitterMessage('fetchTweets', tweets)
|
||||
end)
|
||||
@@ -29,7 +28,6 @@ end)
|
||||
|
||||
RegisterNetEvent('phone:fetchTweetsFiltered')
|
||||
AddEventHandler('phone:fetchTweetsFiltered', function(searchValue)
|
||||
print('fetchTweetsFiltered', searchValue)
|
||||
ESX.TriggerServerCallback('phone:fetchTweetsFiltered', function(tweets)
|
||||
sendTwitterMessage('fetchTweetsFiltered', tweets)
|
||||
end, searchValue)
|
||||
@@ -54,10 +52,22 @@ RegisterNUICallback('phone:createTweet', function(data)
|
||||
end, data)
|
||||
end)
|
||||
|
||||
RegisterNUICallback('phone:getOrCreateTwitterProfile', function()
|
||||
|
||||
function getOrCreateTwitterProfile()
|
||||
ESX.TriggerServerCallback('phone:getOrCreateTwitterProfile', function(profile)
|
||||
sendTwitterMessage('getOrCreateTwitterProfile', profile)
|
||||
end)
|
||||
end
|
||||
|
||||
-- called directly from the UI on app load
|
||||
RegisterNUICallback('phone:getOrCreateTwitterProfile', function()
|
||||
getOrCreateTwitterProfile()
|
||||
end)
|
||||
|
||||
-- called during subsequent updates
|
||||
RegisterNetEvent('phone:getOrCreateTwitterProfile')
|
||||
AddEventHandler('phone:getOrCreateTwitterProfile', function()
|
||||
getOrCreateTwitterProfile()
|
||||
end)
|
||||
|
||||
RegisterNUICallback('phone:updateTwitterProfile', function(data)
|
||||
|
||||
@@ -23,7 +23,7 @@ Config.DestroyPhoneReCheck = 3 --MINUTES /// WIll wait the check for x MINUTES a
|
||||
--Twitter
|
||||
------
|
||||
Config.twitter = {}
|
||||
Config.twitter.generateProfileNameFromUsers = true -- if the player's profile name should be generated from the users.first_name and users.last_name table
|
||||
Config.twitter.generateProfileNameFromUsers = false -- if the player's profile name should be generated from the users.first_name and users.last_name table
|
||||
Config.twitter.characterLimit = 240 -- character limit on tweet messages
|
||||
Config.twitter.allowEdtiableProfileName = true -- whether or not players can edit their profile names
|
||||
-- Config.twitter.enableLikes = true -- whether or not players can like other player's tweets and that they are visible
|
||||
|
||||
@@ -77,6 +77,7 @@ function getProfile(identifier, cb)
|
||||
MySQL.Async.fetchAll([[
|
||||
SELECT * FROM npwd_twitter_profiles
|
||||
WHERE identifier = @identifier
|
||||
LIMIT 1
|
||||
]],
|
||||
{ identifier = identifier },
|
||||
function(result)
|
||||
|
||||
Reference in new issue
Block a user