diff --git a/src/github.com/matrix-org/go-neb/realms/jira/jira.go b/src/github.com/matrix-org/go-neb/realms/jira/jira.go index 1b31a92..68532cc 100644 --- a/src/github.com/matrix-org/go-neb/realms/jira/jira.go +++ b/src/github.com/matrix-org/go-neb/realms/jira/jira.go @@ -33,6 +33,7 @@ type JIRARealm struct { PublicKeyPEM string // clobbered based on PrivateKeyPEM PrivateKeyPEM string HasWebhook bool // clobbered based on NEB + StarterLink string } // JIRASession represents a single authentication session between a user and a JIRA endpoint. diff --git a/src/github.com/matrix-org/go-neb/services/jira/jira.go b/src/github.com/matrix-org/go-neb/services/jira/jira.go index deb8027..8793705 100644 --- a/src/github.com/matrix-org/go-neb/services/jira/jira.go +++ b/src/github.com/matrix-org/go-neb/services/jira/jira.go @@ -118,8 +118,13 @@ func (s *jiraService) cmdJiraCreate(roomID, userID string, args []string) (inter cli, err := r.JIRAClient(userID, false) if err != nil { if err == sql.ErrNoRows { // no client found - return &matrix.TextMessage{"m.notice", - userID + " : You have not linked your JIRA account."}, nil + return matrix.StarterLinkMessage{ + Body: fmt.Sprintf( + "You need to OAuth with JIRA on %s before you can create issues.", + r.JIRAEndpoint, + ), + Link: r.StarterLink, + }, nil } return nil, err }