Get channel name from "token"
This commit is contained in:
parent
f76979298d
commit
9a6ecac4d8
|
@ -44,10 +44,14 @@ func (h *micropubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
channel, err := redis.String(conn.Do("HGET", "sources", sourceID))
|
channel, err := redis.String(conn.Do("HGET", "sources", sourceID))
|
||||||
|
if err != nil {
|
||||||
|
|
||||||
|
channel, err = redis.String(conn.Do("HGET", "token:"+sourceID, "channel"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, "Unknown source", 400)
|
http.Error(w, "Unknown source", 400)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var item microsub.Item
|
var item microsub.Item
|
||||||
ok := false
|
ok := false
|
||||||
|
|
Loading…
Reference in New Issue
Block a user