Skip to content

Commit

Permalink
Regression: Various search provider fixes (#10591)
Browse files Browse the repository at this point in the history
* should fix the issue that suggestions are still displayed even if search is already triggered

* add link to chatpal.io to the admin ui

* remove unsed icon and change icon size in order to fix firefox display issue

* should fix the issue with the event trigger for search providers

* Update deleteMessage.js

* Always call afterDeleteMessage calback
  • Loading branch information
tkurz authored and sampaiodiego committed Apr 27, 2018
1 parent 72a855a commit b5a8e2b
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 24 deletions.
1 change: 1 addition & 0 deletions packages/chatpal-search/client/template/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{{#unless isAdmin}}
<p>{{_ "You_are_not_authorized_to_view_this_page"}}</p>
{{else}}
<p>{{{_ "Chatpal_Get_more_information_about_chatpal_on_our_website"}}}</p>
<form>
<div class="rocket-form">
<fieldset>
Expand Down
1 change: 0 additions & 1 deletion packages/chatpal-search/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Package.onUse(function(api) {
]);

api.addFiles('server/asset/chatpal-enter.svg', 'server', {isAsset:true});
api.addFiles('server/asset/chatpal-logo-icon-lightblue.svg', 'server', {isAsset:true});
api.addFiles('server/asset/chatpal-logo-icon-darkblue.svg', 'server', {isAsset:true});

api.addFiles([
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

1 change: 0 additions & 1 deletion packages/chatpal-search/server/asset/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* globals Inject */

Inject.rawBody('chatpal-enter', Assets.getText('server/asset/chatpal-enter.svg'));
Inject.rawBody('chatpal-logo-icon-lightblue', Assets.getText('server/asset/chatpal-logo-icon-lightblue.svg'));
Inject.rawBody('chatpal-logo-icon-darkblue', Assets.getText('server/asset/chatpal-logo-icon-darkblue.svg'));
3 changes: 2 additions & 1 deletion packages/rocketchat-i18n/i18n/de.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@
"Chatpal_ERROR_username_already_exists": "Benutzername existiert bereits",
"Chatpal_created_key_successfully": "API-Key erfolgreich erstellt",
"Chatpal_run_search": "Suche",
"Chatpal_Get_more_information_about_chatpal_on_our_website": "Finden Sie mehr über Chatpal heraus, unter <a target=\"_blank\" href=\"http://chatpal.io\">http://chatpal.io</a>!",
"CDN_PREFIX": "CDN-Präfix",
"Certificates_and_Keys": "Zertifikate und Schlüssel",
"Change_Room_Type": "Ändere den Typ des Raums",
Expand Down Expand Up @@ -2343,4 +2344,4 @@
"your_message_optional": "Ihre optionale Nachricht",
"Your_password_is_wrong": "Falsches Passwort",
"Your_push_was_sent_to_s_devices": "Eine Push-Nachricht wurde an %s Geräte gesendet."
}
}
1 change: 1 addition & 0 deletions packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@
"Chatpal_ERROR_username_already_exists": "Username already exists",
"Chatpal_created_key_successfully": "API-Key created successfully",
"Chatpal_run_search": "Search",
"Chatpal_Get_more_information_about_chatpal_on_our_website": "Get more information about Chatpal on <a target=\"_blank\" href=\"http://chatpal.io\">http://chatpal.io</a>!",
"CDN_PREFIX": "CDN Prefix",
"Certificates_and_Keys": "Certificates and Keys",
"Change_Room_Type": "Changing the Room Type",
Expand Down
8 changes: 4 additions & 4 deletions packages/rocketchat-lib/server/functions/deleteMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ RocketChat.deleteMessage = function(message, user) {
if (message.file && message.file._id) {
FileUpload.getStore('Uploads').deleteById(message.file._id);
}

Meteor.defer(function() {
RocketChat.callbacks.run('afterDeleteMessage', deletedMsg);
});
}

Meteor.defer(function() {
RocketChat.callbacks.run('afterDeleteMessage', deletedMsg || { _id: message._id });
});

// update last message
if (RocketChat.settings.get('Store_Last_Message')) {
const room = RocketChat.models.Rooms.findOneById(message.rid, { fields: { lastMessage: 1 } });
Expand Down
4 changes: 3 additions & 1 deletion packages/rocketchat-search/client/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ Template.RocketSearch.onCreated(function() {
//TODO what should happen
} else {
this.suggestionActive.set(undefined);
this.suggestions.set(result);
if (value !== this.scope.text.get()) {
this.suggestions.set(result);
}
}
});
};
Expand Down

0 comments on commit b5a8e2b

Please sign in to comment.