This commit is contained in:
lx
2026-07-06 14:01:11 -04:00
commit c4f97d729d
16468 changed files with 935321 additions and 0 deletions
@@ -0,0 +1,39 @@
local CorePackages = game:GetService("CorePackages")
local ReceivedUserPresence = require(CorePackages.AppTempCommon.LuaChat.Actions.ReceivedUserPresence)
local WebPresenceMap = require(CorePackages.AppTempCommon.LuaApp.Enum.WebPresenceMap)
local luaChatUseNewFriendsAndPresenceEndpoint = settings():GetFFlag("LuaChatUseNewFriendsAndPresenceEndpointV356")
local luaChatPlayTogetherUseRootPresence = settings():GetFFlag("LuaChatPlayTogetherUseRootPresence")
local luaChatRootPresenceEnabled = luaChatUseNewFriendsAndPresenceEndpoint and luaChatPlayTogetherUseRootPresence
return function(friendsPresence, store)
for _, presenceModel in pairs(friendsPresence) do
local userInStore = store:getState().Users[tostring(presenceModel.userId)]
local previousUniverseId = userInStore and userInStore.universeId or nil
if luaChatRootPresenceEnabled then
store:dispatch(ReceivedUserPresence(
tostring(presenceModel.userId),
WebPresenceMap[presenceModel.userPresenceType],
presenceModel.lastLocation,
presenceModel.placeId and tostring(presenceModel.placeId) or nil,
presenceModel.rootPlaceId and tostring(presenceModel.rootPlaceId) or nil,
presenceModel.gameId and tostring(presenceModel.gameId) or nil,
presenceModel.lastOnline and tostring(presenceModel.lastOnline) or nil,
presenceModel.universeId,
previousUniverseId
))
else
store:dispatch(ReceivedUserPresence(
tostring(presenceModel.userId),
WebPresenceMap[presenceModel.userPresenceType],
presenceModel.lastLocation,
presenceModel.placeId and tostring(presenceModel.placeId) or nil,
presenceModel.gameId and tostring(presenceModel.gameId) or nil,
presenceModel.universeId,
previousUniverseId
))
end
end
end