Skip to content

Commit

Permalink
Add current time if no last message found
Browse files Browse the repository at this point in the history
  • Loading branch information
bewuethr committed Sep 24, 2022
1 parent f9e5462 commit d51acea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/slacktenure
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ tenureupdate() {
if [[ $deleted == 'true' ]]; then
# Newly alum, get last
status='alum'
last=$(findlast "$id" | msg2timestamp)
if ! last=$(findlast "$id" | msg2timestamp); then
# Use "now" if no last message found
printf -v last '%(%s)T' -2
fi
fi
;;

Expand Down

0 comments on commit d51acea

Please sign in to comment.