Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/swimmy/command/attendance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Attendance < Swimmy::Command::Base
command 'hi', 'bye' do |client, data, match|

cmd = match[:command]
arg = match[:expression]
arg = match[:expression]&.strip
now = Time.now
user = client.web_client.users_info(user: data.user).user
user_id = user.id
Expand Down Expand Up @@ -60,7 +60,7 @@ def self.parse_arg(arg)
active_members = spreadsheet.sheet("members", Swimmy::Resource::Member).fetch.select {|m| m.active? }.map {|m| m.account }

case arg
in nil
in nil | ""
# return "do_current_user" if arg is not specified
return "do_current_user"
in String => s if active_members.include?(s)
Expand Down