SyntaxGameServer/RCCService2018/content/internal/Chat/Modules/LuaChat/Analytics/Events/shareGameToChatFromChat.lua

19 lines
500 B
Lua

local PlayerService = game:GetService("Players")
return function(eventStreamImpl, eventContext, conversationId, placeId)
assert(type(eventContext) == "string", "Expected eventContext to be a string")
local eventName = "shareGameToChatFromChat"
local player = PlayerService.LocalPlayer
local userId = "UNKNOWN"
if player then
userId = tostring(player.UserId)
end
eventStreamImpl:setRBXEventStream(eventContext, eventName, {
uid = userId,
cid = conversationId,
pid = placeId,
})
end