fixed bugs in community profile

This commit is contained in:
2025-10-18 16:45:43 -06:00
parent 83bd817630
commit 94c3877819
8 changed files with 80 additions and 25 deletions
+6
View File
@@ -112,6 +112,12 @@ func (c *amContext) ClearSession() {
// CurrentCommunity returns the current community, if one's been set.
func (c *amContext) CurrentCommunity() *database.Community {
if c.community == nil {
cv, ok := c.session.Values["lastCommunity"]
if ok && !c.CurrentUser().IsAnon {
c.SetCommunityContext(fmt.Sprintf("%d", cv))
}
}
return c.community
}