Use account id as a reference to avatar in issue

This commit is contained in:
streetturtle 2020-02-16 14:10:21 -05:00
parent 249ac4d688
commit 541f6edd54
1 changed files with 2 additions and 2 deletions

View File

@ -97,13 +97,13 @@ local function worker(args)
for i = 0, #rows do rows[i]=nil end for i = 0, #rows do rows[i]=nil end
for _, issue in ipairs(result.issues) do for _, issue in ipairs(result.issues) do
local path_to_avatar = os.getenv("HOME") ..'/.cache/awmw/jira-widget/avatars/' .. issue.fields.assignee.key local path_to_avatar = os.getenv("HOME") ..'/.cache/awmw/jira-widget/avatars/' .. issue.fields.assignee.accountId
if not gfs.file_readable(path_to_avatar) then if not gfs.file_readable(path_to_avatar) then
spawn.easy_async(string.format( spawn.easy_async(string.format(
DOWNLOAD_AVATAR_CMD, DOWNLOAD_AVATAR_CMD,
HOME_DIR, HOME_DIR,
issue.fields.assignee.key, issue.fields.assignee.accountId,
issue.fields.assignee.avatarUrls['48x48'])) issue.fields.assignee.avatarUrls['48x48']))
end end