import posts at least partially tested, we should do some more work on it - also, a few other bugs have been stomped

This commit is contained in:
2026-02-28 22:58:56 -07:00
parent 210712a58d
commit 9a3860f796
10 changed files with 96 additions and 44 deletions
+3 -4
View File
@@ -782,11 +782,10 @@ func CreateCommunity(ctxt ui.AmContext) (string, any) {
}
var testcomm *database.Community
testcomm, err = database.AmGetCommunityByAlias(ctxt.Ctx(), dlg.Field("alias").Value)
if err != nil {
return dlg.RenderError(ctxt, err.Error())
}
if testcomm != nil {
if err == nil {
return dlg.RenderError(ctxt, fmt.Sprintf("A community with the alias \"%s\" already exists; please try again.", testcomm.Alias))
} else if err != database.ErrNoCommunity {
return dlg.RenderError(ctxt, err.Error())
}
var hideDir, hideSearch bool
switch dlg.Field("hidemode").Value {