mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-19 17:37:43 +00:00
bugfixes in sync
This commit is contained in:
@ -214,6 +214,8 @@ struct NostrFilter {
|
||||
struct NostrFilterGroup {
|
||||
std::vector<NostrFilter> filters;
|
||||
|
||||
NostrFilterGroup() {}
|
||||
|
||||
// Note that this expects the full array, so the first two items are "REQ" and the subId
|
||||
NostrFilterGroup(const tao::json::value &req, uint64_t maxFilterLimit = cfg().relay__maxFilterLimit) {
|
||||
const auto &arr = req.get_array();
|
||||
@ -225,7 +227,7 @@ struct NostrFilterGroup {
|
||||
}
|
||||
}
|
||||
|
||||
// Hacky! Deserves a refactor
|
||||
// FIXME refactor: Make unwrapped the default constructor
|
||||
static NostrFilterGroup unwrapped(tao::json::value filter, uint64_t maxFilterLimit = cfg().relay__maxFilterLimit) {
|
||||
if (!filter.is_array()) {
|
||||
filter = tao::json::value::array({ filter });
|
||||
|
Reference in New Issue
Block a user