lmcli chat: check that conversation exists
This commit is contained in:
@@ -57,7 +57,7 @@ func LookupConversation(ctx *lmcli.Context, shortName string) *model.Conversatio
|
||||
lmcli.Fatal("Could not lookup conversation: %v\n", err)
|
||||
}
|
||||
if c.ID == 0 {
|
||||
lmcli.Fatal("Conversation not found with short name: %s\n", shortName)
|
||||
lmcli.Fatal("Conversation not found: %s\n", shortName)
|
||||
}
|
||||
return c
|
||||
}
|
||||
@@ -68,7 +68,7 @@ func LookupConversationE(ctx *lmcli.Context, shortName string) (*model.Conversat
|
||||
return nil, fmt.Errorf("Could not lookup conversation: %v", err)
|
||||
}
|
||||
if c.ID == 0 {
|
||||
return nil, fmt.Errorf("Conversation not found with short name: %s", shortName)
|
||||
return nil, fmt.Errorf("Conversation not found: %s", shortName)
|
||||
}
|
||||
return c, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user