openidec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit cb985e884030b5174318a0d16d49d1d8e337d137
parent cc6f6fa23c7a6315f9ad31f4625aa2932237531d
Author: Peter Kosyh <p.kosyh@gmail.com>
Date:   Thu,  3 Sep 2020 22:48:21 +0300

fix detect parent

Diffstat:
Mii-node/web.go | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ii-node/web.go b/ii-node/web.go @@ -111,6 +111,9 @@ func getTopics(db *ii.DB, mi []*ii.MsgInfo) map[string][]string { } var l []string for p := m; p != nil; p = getParent(db, p) { + if m.Echo != p.Echo { + break + } l = append(l, p.Id) } if len(l) == 0 { @@ -315,7 +318,7 @@ func www_reply(user *ii.User, www WWW, w http.ResponseWriter, r *http.Request, i subj := r.FormValue("subj") to := r.FormValue("to") msg := r.FormValue("msg") - text := fmt.Sprintf("%s\n%s\n%s\n\n@repto:%s\n%s", m.Echo, to, subj, m.MsgId, msg) + text := fmt.Sprintf("%s\n%s\n%s\n\n@repto:%s\n%s", m.Echo+"2", to, subj, m.MsgId, msg) ii.Trace.Printf("Reply msg: %s\n", text) m, err := ii.DecodeMsgline(text, false) if err != nil { @@ -335,6 +338,9 @@ func www_reply(user *ii.User, www WWW, w http.ResponseWriter, r *http.Request, i return nil } for p := mi; p != nil; p = getParent(www.db, p) { + if p.Echo != mi.Echo { + break + } topic = p.Id } http.Redirect(w, r, "/" + topic + "/-1", http.StatusSeeOther)