mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
Improve username tagging on leaderboard
This commit is contained in:
parent
b915b8f0c7
commit
560c7f33c4
2 changed files with 2 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ class SailorsLogNotifyJob < ApplicationJob
|
|||
|
||||
hours = project_duration / 3600
|
||||
|
||||
message = ":boat: <@#{SlackUsername.find_by_uid(slack_uid)}> just coded 1 more hour on *#{project_name}* (total: #{hours}hrs). _#{kudos_message}_"
|
||||
message = ":boat: `@#{SlackUsername.find_by_uid(slack_uid)}` just coded 1 more hour on *#{project_name}* (total: #{hours}hrs). _#{kudos_message}_"
|
||||
|
||||
response = HTTP.auth("Bearer #{ENV['SAILORS_LOG_SLACK_BOT_OAUTH_TOKEN']}")
|
||||
.post("https://slack.com/api/chat.postMessage",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class SailorsLogLeaderboard < ApplicationRecord
|
|||
|
||||
stats.each_with_index do |entry, index|
|
||||
medal = medals[index] || "white_small_square"
|
||||
msg += "\n:#{medal}: `<@#{SlackUsername.find_by_uid(entry[:user_id])}>`: #{short_time_simple entry[:duration]} → "
|
||||
msg += "\n:#{medal}: `@#{SlackUsername.find_by_uid(entry[:user_id])}`: #{short_time_simple entry[:duration]} → "
|
||||
msg += entry[:projects].map do |project|
|
||||
language = project[:language_emoji] ? "#{project[:language_emoji]} #{project[:language]}" : project[:language]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue