Skip to content

Commit

Permalink
Hash color (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonsturgeon authored Oct 8, 2023
1 parent 4e4e888 commit 88439d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions moon/cfc_chat_transit/server/avatar_service.moon
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ class AvatarService
baseURL = "https://#{imageAddress}/avatars/#{realm}"

url = steamID64 and "#{baseURL}/#{steamID64}.png" or nil
url and= "#{url}?processed=true" if @processedIDs[steamID64]

processed = @processedIDs[steamID64]
url = url and processed and "#{url}?hash=#{processed}"

return url

Expand All @@ -27,7 +29,7 @@ class AvatarService
failed = @logger\error
success = (code, body) ->
@logger\debug "Avatar request succeeded with code: #{code} | Body: #{body}"
@processedIDs[steamID64] = true
@processedIDs[steamID64] = util.CRC( tostring( outlineColor ) )

HTTP
:success
Expand Down

0 comments on commit 88439d1

Please sign in to comment.