{"record":{"id":"1ccaae12c599f4bf","repo":"sipeed/picoclaw","slug":"search-chats-w","errorCode":null,"errorMessage":"search chats: %w","messagePattern":"search chats: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/deltachat/deltachat.go","lineNumber":795,"sourceCode":"\t\tcontact.Name,\n\t\tcontact.Address,\n\t\tcontact.NameAndAddr,\n\t}\n\tif local, _, ok := strings.Cut(contact.Address, \"@\"); ok {\n\t\taliases = append(aliases, local, \"@\"+local)\n\t}\n\tfor _, alias := range aliases {\n\t\tif strings.EqualFold(strings.TrimSpace(alias), query) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc (c *DeltaChatChannel) findMatchingChats(ctx context.Context, query string) ([]dcChat, error) {\n\traw, err := c.rpc.call(ctx, \"get_chatlist_entries\", c.accountID, 0, query, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"search chats: %w\", err)\n\t}\n\tvar chatIDs []int64\n\tif err := json.Unmarshal(raw, &chatIDs); err != nil {\n\t\treturn nil, fmt.Errorf(\"search chats decode: %w\", err)\n\t}\n\tvar chats []dcChat\n\tfor _, chatID := range uniqueInt64s(chatIDs) {\n\t\tif chatID <= 0 {\n\t\t\tcontinue\n\t\t}\n\t\tchat, err := c.getFullChatByContext(ctx, chatID)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif chat.IsDeviceChat {\n\t\t\tcontinue\n\t\t}\n\t\tchats = append(chats, *chat)","sourceCodeStart":777,"sourceCodeEnd":813,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/deltachat/deltachat.go#L777-L813","documentation":"Error \"search chats: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/channels/deltachat/deltachat.go:795 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}