Changeset 0.15.0 patches (#72)
This commit is contained in:
@@ -829,18 +829,6 @@ func (h *CompletionHandler) loadConversation(channelID, userID, presetSystemProm
|
||||
return messages, nil
|
||||
}
|
||||
|
||||
// isSummaryMessage checks if a PathMessage has summary metadata.
|
||||
func isSummaryMessage(m *PathMessage) bool {
|
||||
if m.Metadata == nil {
|
||||
return false
|
||||
}
|
||||
var meta map[string]interface{}
|
||||
if err := json.Unmarshal(*m.Metadata, &meta); err != nil {
|
||||
return false
|
||||
}
|
||||
return meta["type"] == "summary"
|
||||
}
|
||||
|
||||
// ── Message Persistence ─────────────────────
|
||||
|
||||
// persistMessage inserts a message into the tree, updates the cursor, and
|
||||
|
||||
@@ -33,7 +33,7 @@ func (h *SummarizeHandler) Summarize(c *gin.Context) {
|
||||
// ── Verify channel ownership ──
|
||||
var ownerID string
|
||||
err := database.DB.QueryRow(
|
||||
`SELECT user_id FROM channels WHERE id = $1 AND deleted_at IS NULL`, channelID,
|
||||
`SELECT user_id FROM channels WHERE id = $1`, channelID,
|
||||
).Scan(&ownerID)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusNotFound, gin.H{"error": "channel not found"})
|
||||
|
||||
Reference in New Issue
Block a user