diff --git a/lib/oto/commands/util/slack.dart b/lib/oto/commands/util/slack.dart index bdedbda..13c6d7c 100644 --- a/lib/oto/commands/util/slack.dart +++ b/lib/oto/commands/util/slack.dart @@ -20,9 +20,15 @@ class Slack extends Command { if (value != null) { message = value as DataSlack; } + } else { + message = data.message; + } + + if (message != null) { + await sender.send(message); + } else { + throw Exception('property or message field should not be null'); } - message = data.message; - await sender.send(message); return simpleFuture; } diff --git a/pubspec.yaml b/pubspec.yaml index d695128..99a8bc2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,6 +17,7 @@ dependencies: git: url: toki@toki-labs.com:/Volumes/Data2/git/dart_framework.git ref: master + color: ^3.0.0 dev_dependencies: lints: ^3.0.0