-- Get a list of blocked users from the corescripts.
-- Spawned because this method can yeild.

spawn(function()
	-- Pcalled because this method is not released on all platforms yet.
	if LocalPlayer.UserId > 0 then
		pcall(function()
			local blockedUserIds = StarterGui:GetCore("GetBlockedUserIds")
			if #blockedUserIds > 0 then
				local setInitalBlockedUserIds = DefaultChatSystemChatEvents:FindFirstChild("SetBlockedUserIdsRequest")
				if setInitalBlockedUserIds then
					setInitalBlockedUserIds:FireServer(blockedUserIds)
				end
			end
		end)
	end
end)

spawn(function()
	local success, canLocalUserChat = pcall(function()
		return Chat:CanUserChatAsync(LocalPlayer.UserId)
	end)
	if success then
		canChat = RunService:IsStudio() or canLocalUserChat
	end
end)

local initData = EventFolder.GetInitDataRequest:InvokeServer()
