Implement spider functionality for event synchronization
- Introduced a new `spider` package to manage connections to admin relays and synchronize events for followed pubkeys. - Added configuration options for spider mode in the application settings, allowing for different operational modes (e.g., follows). - Implemented callback mechanisms to dynamically retrieve admin relays and follow lists. - Enhanced the main application to initialize and manage the spider, including starting and stopping its operation. - Added tests to validate spider creation, callbacks, and operational behavior. - Bumped version to v0.17.14.
This commit is contained in:
@@ -114,9 +114,20 @@ func UnmarshalQuoted(b []byte) (content, rem []byte, err error) {
|
||||
//
|
||||
// backspace, tab, newline, form feed or carriage return.
|
||||
case '\b', '\t', '\n', '\f', '\r':
|
||||
pos := len(content) - len(rem)
|
||||
contextStart := pos - 10
|
||||
if contextStart < 0 {
|
||||
contextStart = 0
|
||||
}
|
||||
contextEnd := pos + 10
|
||||
if contextEnd > len(content) {
|
||||
contextEnd = len(content)
|
||||
}
|
||||
err = errorf.E(
|
||||
"invalid character '%s' in quoted string",
|
||||
"invalid character '%s' in quoted string (position %d, context: %q)",
|
||||
NostrEscape(nil, rem[:1]),
|
||||
pos,
|
||||
string(content[contextStart:contextEnd]),
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user