Get channel name from "token"

This commit is contained in:
Peter Stuifzand 2018-07-15 00:07:44 +02:00
parent f76979298d
commit 9a6ecac4d8

View File

@ -44,10 +44,14 @@ func (h *micropubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
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 {
http.Error(w, "Unknown source", 400)
return
}
}
var item microsub.Item
ok := false