mirror of https://github.com/zlatinb/muwire
add flag for profile support in queries
parent
a3f40da51c
commit
806fab9b2d
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue