mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-28 15:27:43 +00:00
Add scaffold for link normalization
This commit is contained in:
parent
dc09698e36
commit
3eb7c58e90
1 changed files with 8 additions and 0 deletions
|
@ -449,6 +449,13 @@ func bunchGetCacheStatus(br bunchedRequest, client *ClientInfo) (cacheStatus, ca
|
|||
return CacheStatusNotFound, emptyCachedBunchedResponse
|
||||
}
|
||||
|
||||
func normalizeBunchedRequest(br bunchedRequest) bunchedRequest {
|
||||
if br.Command == "get_link" {
|
||||
// TODO
|
||||
}
|
||||
return br
|
||||
}
|
||||
|
||||
// C2SHandleBunchedCommand handles C2S Commands such as `get_link`.
|
||||
// It makes a request to the backend server for the data, but any other requests coming in while the first is pending also get the responses from the first one.
|
||||
// Additionally, results are cached.
|
||||
|
@ -456,6 +463,7 @@ func C2SHandleBunchedCommand(conn *websocket.Conn, client *ClientInfo, msg Clien
|
|||
// FIXME(riking): Function is too complex
|
||||
|
||||
br := bunchedRequestFromCM(&msg)
|
||||
br = normalizeBunchedRequest(br)
|
||||
|
||||
cacheStatus, cachedResponse := bunchGetCacheStatus(br, client)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue