diff --git a/core/src/main/groovy/com/muwire/core/connection/Connection.groovy b/core/src/main/groovy/com/muwire/core/connection/Connection.groovy index 72d4ba20..1230756c 100644 --- a/core/src/main/groovy/com/muwire/core/connection/Connection.groovy +++ b/core/src/main/groovy/com/muwire/core/connection/Connection.groovy @@ -157,6 +157,7 @@ abstract class Connection implements Closeable { query.collections = e.searchEvent.collections query.searchPaths = e.searchEvent.searchPaths query.regex = e.searchEvent.regex + query.profile = e.searchEvent.profile if (e.searchEvent.searchHash != null) query.infohash = Base64.encode(e.searchEvent.searchHash) query.replyTo = e.replyTo.toBase64() @@ -289,6 +290,9 @@ abstract class Connection implements Closeable { boolean regex = false if (search.regex != null) regex = search.regex + boolean profile = false + if (search.profile != null) + profile = search.profile byte[] sig if (search.sig != null) { @@ -346,6 +350,7 @@ abstract class Connection implements Closeable { collections : collections, searchPaths: searchPaths, regex: regex, + profile: profile, persona : originator) QueryEvent event = new QueryEvent ( searchEvent : searchEvent, replyTo : replyTo, diff --git a/core/src/main/groovy/com/muwire/core/search/SearchEvent.groovy b/core/src/main/groovy/com/muwire/core/search/SearchEvent.groovy index d53388a6..c67f281c 100644 --- a/core/src/main/groovy/com/muwire/core/search/SearchEvent.groovy +++ b/core/src/main/groovy/com/muwire/core/search/SearchEvent.groovy @@ -16,6 +16,7 @@ class SearchEvent extends Event { boolean collections boolean searchPaths boolean regex + boolean profile String toString() { def infoHash = null @@ -23,6 +24,7 @@ class SearchEvent extends Event { infoHash = new InfoHash(searchHash) "searchTerms: $searchTerms searchHash:$infoHash, uuid:$uuid " + "oobInfohash:$oobInfohash searchComments:$searchComments " + - "compressedResults:$compressedResults regex:$regex" + "compressedResults:$compressedResults regex:$regex" + + "profile:$profile" } }