New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search: add nick keyword search #4579
base: master
Are you sure you want to change the base?
Conversation
- search messages by author with `from:nick` - add section to Help.vue - should be easy to adapt this into global keyword-based search thelounge#4209
|
||
if (filters && Object.keys(filters).length) { | ||
if (filters.from) { | ||
select += ' AND json_extract(msg, "$.from.nick") LIKE ?'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need ESCAPE, or do we expect from:
to be exact matches, why use LIKE
then?
}) | ||
); | ||
|
||
store.index( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a few messages from users like thelounge007abc
abcthelounge007
, abcthelounge007abc
to test whether there are partial nick matches.
// - "from:nick" to find messages sent by a given nick | ||
const keywords = ["from"]; | ||
const joinedKeywords = keywords.map((kw) => kw + ":").join("|"); | ||
const filterExp = RegExp(`((${joinedKeywords})(\\S+))+`, "g"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need \s* or \b? testfrom:xpaw
from:nick
Help.vue
#4209