bug fixes related to top page and post link rewriting

This commit is contained in:
2026-04-19 17:26:38 -05:00
parent 3deb11e0a5
commit 391d8ccc99
3 changed files with 6 additions and 3 deletions
+2
View File
@@ -127,6 +127,7 @@ func buildPostLink(decoded, context *database.PostLinkData) string {
b.WriteString(context.Conference)
} else {
b.WriteString(decoded.Conference)
started = true
}
b.WriteString(".")
if decoded.Topic == -1 {
@@ -168,6 +169,7 @@ func (rw *postLinkRewriter) Rewrite(ctx context.Context, data string, svc rewrit
if err != nil {
return nil
}
mydata.CommId = ctxt.CommId
err = mydata.VerifyNames(ctx)
if err != nil {
return nil
+3 -2
View File
@@ -342,7 +342,6 @@ func (st *amSessionStore) SessionInfo() (int, []string, int) {
func (st *amSessionStore) sweep(tick <-chan time.Time, done chan bool) {
for range tick {
if st.sweepRunning.Load() {
log.Infof("session sweep running")
// phase 1 - identify expired sessions
st.mutex.RLock()
zap := make([]string, 0, len(st.sessions))
@@ -353,7 +352,9 @@ func (st *amSessionStore) sweep(tick <-chan time.Time, done chan bool) {
}
}
st.mutex.RUnlock()
log.Infof("identified %d sessions to zap", len(zap))
if len(zap) > 0 {
log.Infof("identified %d sessions to zap", len(zap))
}
// phase 2 - get rid of the expired sessions
for _, k := range zap {
+1 -1
View File
@@ -33,7 +33,7 @@
{{ user = post_getUserName(p, .) }}
{{ text = post_getText(p, .) }}
{{ topic = post_topic(p, .) }}
{{ link = post_topicLink(topic, comms[i], .) }}
{{ link = post_topicLink(comms[i], topic, .) }}
<div class="text-black text-sm">
<div class="mb-2">
<strong>{{ p.Pseud | raw }}</strong>