diff --git a/pkg/controller/inbox/compose.go b/pkg/controller/inbox/compose.go index 490047b..94e6ce4 100644 --- a/pkg/controller/inbox/compose.go +++ b/pkg/controller/inbox/compose.go @@ -41,12 +41,6 @@ func Compose() http.HandlerFunc { return } - // If we already have a thread open with them, go to that instead of the stand-alone compose page. - if msgID, ok := models.HasMessageThread(currentUser, user); ok { - templates.Redirect(w, fmt.Sprintf("/messages/read/%d", msgID)) - return - } - // POSTing? if r.Method == http.MethodPost { var ( @@ -75,6 +69,12 @@ func Compose() http.HandlerFunc { return } + // If we already have a thread open with them, go to that instead of the stand-alone compose page. + if msgID, ok := models.HasMessageThread(currentUser, user); ok { + templates.Redirect(w, fmt.Sprintf("/messages/read/%d", msgID)) + return + } + // On GET request (come from a user profile page): // Do not allow a shy user to initiate DMs with a non-shy one. var (