aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg/envelope.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msg/envelope.go')
-rw-r--r--commands/msg/envelope.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/commands/msg/envelope.go b/commands/msg/envelope.go
index e104648d..62a266b0 100644
--- a/commands/msg/envelope.go
+++ b/commands/msg/envelope.go
@@ -26,13 +26,18 @@ func (Envelope) Aliases() []string {
}
func (e Envelope) Execute(args []string) error {
- acct := app.SelectedAccount()
+ provider, ok := app.SelectedTabContent().(app.ProvidesMessages)
+ if !ok {
+ return fmt.Errorf("current tab does not implement app.ProvidesMessage interface")
+ }
+
+ acct := provider.SelectedAccount()
if acct == nil {
return errors.New("No account selected")
}
var list []string
- if msg, err := acct.SelectedMessage(); err != nil {
+ if msg, err := provider.SelectedMessage(); err != nil {
return err
} else {
if msg != nil {