<commit_before># This file is still being used by (at least):
#
# * users#show
# * the setting of currentUser in _currentUser.html.erb
#
#      -- mark (noted down because I thought initially it wasn't used)

user ||= @user
graph_user = user.graph_user

json.partial! 'users/user_partial', user: user

json.graph_id graph_user.id

json.location nil_if_empty user.location
json.biography nil_if_empty user.biography

json.all_channel_id graph_user.stream_id
json.created_facts_channel_id graph_user.created_facts_channel_id

is_current_user = (user == current_user)
json.is_current_user is_current_user
if is_current_user
  json.receives_mailed_notifications user.receives_mailed_notifications
  json.receives_digest user.receives_digest

  json.services do |json|
    json.twitter  can?(:share_to, :twitter)
    json.facebook can?(:share_to, :facebook)
  end<commit_msg>Added expiry to current_user json<commit_after># This file is still being used by (at least):
#
# * users#show
# * the setting of currentUser in _currentUser.html.erb
#
#      -- mark (noted down because I thought initially it wasn't used)

user ||= @user
graph_user = user.graph_user

json.partial! 'users/user_partial', user: user

json.graph_id graph_user.id

json.location nil_if_empty user.location
json.biography nil_if_empty user.biography

json.all_channel_id graph_user.stream_id
json.created_facts_channel_id graph_user.created_facts_channel_id

is_current_user = (user == current_user)
json.is_current_user is_current_user
if is_current_user
  json.receives_mailed_notifications user.receives_mailed_notifications
  json.receives_digest user.receives_digest

  json.services do |json|

    if can?(:share_to, :twitter)
      json.twitter true
    end

    if can?(:share_to, :facebook)
      json.facebook true
      json.facebook_expires_at user.identities['facebook']['credentials']['expires_at']
    end
  end
{'fraction_non_alphanumeric': 0.08346539883782356, 'fraction_numerical': 0.0, 'mean_word_length': 5.14935064935065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5983073', 'n_tokens_mistral': 645, 'n_tokens_neox': 629, 'n_words': 147}