MCPcopy Create free account
hub / github.com/compozy/agh / NetworkThreads

Method NetworkThreads

internal/api/core/network_conversations.go:19–47  ·  view source on GitHub ↗

NetworkThreads returns public-thread summaries for one channel.

(c *gin.Context)

Source from the content-addressed store, hash-verified

17
18// NetworkThreads returns public-thread summaries for one channel.
19func (h *BaseHandlers) NetworkThreads(c *gin.Context) {
20 if _, ok := h.requireNetworkReadDependencies(c); !ok {
21 return
22 }
23 networkStore := h.NetworkStore
24 channel, err := normalizeNetworkChannel(c.Param("channel"))
25 if err != nil {
26 h.respondError(c, StatusForNetworkError(err), err)
27 return
28 }
29 scope, ok := h.resolveWorkspaceScope(c)
30 if !ok {
31 return
32 }
33 query, err := parseNetworkThreadQuery(c)
34 if err != nil {
35 h.respondError(c, http.StatusBadRequest, err)
36 return
37 }
38
39 threads, err := networkStore.ListThreads(c.Request.Context(), scope.NetworkChannelRef(channel), query)
40 if err != nil {
41 h.respondError(c, StatusForNetworkError(err), err)
42 return
43 }
44 c.JSON(http.StatusOK, contract.NetworkThreadsResponse{
45 Threads: NetworkThreadSummaryPayloadsFromStore(threads),
46 })
47}
48
49// NetworkThread returns one public-thread summary.
50func (h *BaseHandlers) NetworkThread(c *gin.Context) {

Callers

nothing calls this directly

Calls 9

respondErrorMethod · 0.95
resolveWorkspaceScopeMethod · 0.95
normalizeNetworkChannelFunction · 0.85
StatusForNetworkErrorFunction · 0.85
parseNetworkThreadQueryFunction · 0.85
NetworkChannelRefMethod · 0.80
ListThreadsMethod · 0.65

Tested by

no test coverage detected