commit 623612fce047972d91c481a3cb2eb3e2499ad9bb
parent b2e91e02d2fee28371b60d0479c7dd787b0563d3
Author: Peter Kosyh <p.kosyh@gmail.com>
Date: Sat, 30 Jan 2021 08:43:33 +0000
Merge branch 'master' of https://github.com/gl00my/ii-go
Diffstat:
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ii-node/web.go b/ii-node/web.go
@@ -981,7 +981,7 @@ func _handleWWW(ctx *WebContext, w http.ResponseWriter, r *http.Request) error {
}
ctx.BasePath = "from/" + args[1]
return www_query(ctx, w, r, ii.Query{From: args[1]}, page, rss)
- } else if args[0] == "echo" {
+ } else if args[0] == "echo" || args[0] == "echo+topics" {
page := 1
rss := false
if len(args) < 2 {
@@ -1000,6 +1000,9 @@ func _handleWWW(ctx *WebContext, w http.ResponseWriter, r *http.Request) error {
}
ctx.Echo = q.Echo
q.Start = -PAGE_SIZE
+ if args[0] == "echo+topics" {
+ q.Repto = "!"
+ }
ctx.BasePath = "echo/" + args[1]
return www_query(ctx, w, r, q, page, rss)
} else if ii.IsEcho(args[0]) {
diff --git a/ii/db.go b/ii/db.go
@@ -491,7 +491,11 @@ func (db *DB) Match(info MsgInfo, r Query) bool {
if r.Echo != "" && r.Echo != info.Echo {
return false
}
- if r.Repto != "" && r.Repto != info.Repto {
+ if r.Repto == "!" {
+ if info.Repto != "" {
+ return false
+ }
+ } else if r.Repto != "" && r.Repto != info.Repto {
return false
}
if r.To != "" && r.To != info.To {