-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
filter: Implement has: filters on client side. #15492
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,6 +142,17 @@ exports.is_slash_command = function (content) { | |
|
||
|
||
exports.try_deliver_locally = function (message_request) { | ||
|
||
// Even though has: filers can be applied locally, | ||
// We dont want to locally echo those has: messages | ||
// because: | ||
// 1. has:image, has:attachment are backend only syntax. | ||
// 2. has:link do not get displayed in current narrow | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am able to send messages with link when has:link narrow is active. |
||
// if local echo is on. | ||
if (narrow_state.active() && narrow_state.filter() && narrow_state.filter().has_operator('has')) { | ||
return; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd write the if statement with fewer lines |
||
|
||
if (markdown.contains_backend_only_syntax(message_request.content)) { | ||
return; | ||
} | ||
|
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.
Accidentally removed this line?
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.
yes