Skip to content

Commit

Permalink
Merge branch 'master' into mark-as-unread
Browse files Browse the repository at this point in the history
  • Loading branch information
hmhealey committed Nov 19, 2019
2 parents 5569807 + 02a8c58 commit a515185
Show file tree
Hide file tree
Showing 19 changed files with 1,081 additions and 86 deletions.
9 changes: 4 additions & 5 deletions actions/marketplace.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// See LICENSE.txt for license information.

import {Client4} from 'mattermost-redux/client';
import {installPluginFromUrl} from 'mattermost-redux/actions/admin';

import {getFilter, getPlugin} from 'selectors/views/marketplace';
import {ActionTypes} from 'utils/constants';
Expand Down Expand Up @@ -31,7 +30,7 @@ export function fetchPlugins() {
// installPlugin installs the latest version of the given plugin from the marketplace.
//
// On success, it also requests the current state of the plugins to reflect the newly installed plugin.
export function installPlugin(id) {
export function installPlugin(id, version) {
return async (dispatch, getState) => {
dispatch({
type: ActionTypes.INSTALLING_MARKETPLACE_PLUGIN,
Expand All @@ -50,9 +49,9 @@ export function installPlugin(id) {
return;
}

const downloadUrl = marketplacePlugin.download_url;
const {error} = await dispatch(installPluginFromUrl(downloadUrl, true));
if (error) {
try {
await Client4.installMarketplacePlugin(id, version);
} catch (error) {
dispatch({
type: ActionTypes.INSTALLING_MARKETPLACE_PLUGIN_FAILED,
id,
Expand Down
13 changes: 9 additions & 4 deletions components/admin_console/admin_definition.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1851,23 +1851,28 @@ const AdminDefinition = {
label: t('admin.environment.notifications.pushContents.label'),
label_default: 'Push Notification Contents:',
help_text: t('admin.environment.notifications.pushContents.help'),
help_text_default: '**Send generic description with only sender name** - Includes only the name of the person who sent the message in push notifications, with no information about channel name or message contents.\n **Send generic description with sender and channel names** - Includes the name of the person who sent the message and the channel it was sent in, but not the message text.\n **Send full message snippet** - Includes a message excerpt in push notifications, which may contain confidential information sent in messages. If your Push Notification Service is outside your firewall, it is *highly recommended* this option only be used with an "https" protocol to encrypt the connection.',
help_text_default: '**Generic description with only sender name** - Includes only the name of the person who sent the message in push notifications, with no information about channel name or message contents.\n **Generic description with sender and channel names** - Includes the name of the person who sent the message and the channel it was sent in, but not the message contents.\n **Full message content sent in the notification payload** - Includes the message contents in the push notification payload that is relayed through Apple\'s Push Notification Service (APNS) or Google\'s Firebase Cloud Messaging (FCM). It is **highly recommended** this option only be used with an "https" protocol to encrypt the connection and protect confidential information sent in messages.\n**Full message content fetched from the server on receipt** - The notification payload relayed through APNS or FCM contains no message content, instead it contains a unique message ID used to fetch message content from the server when a push notification is received by a device. If the server cannot be reached, a generic notification will be displayed.',
help_text_markdown: true,
options: [
{
value: 'generic_no_channel',
display_name: t('admin.environment.notifications.pushContents.genericNoChannel'),
display_name_default: 'Send generic description with only sender name',
display_name_default: 'Generic description with only sender name',
},
{
value: 'generic',
display_name: t('admin.environment.notifications.pushContents.generic'),
display_name_default: 'Send generic description with sender and channel names',
display_name_default: 'Generic description with sender and channel names',
},
{
value: 'full',
display_name: t('admin.environment.notifications.pushContents.full'),
display_name_default: 'Send full message snippet',
display_name_default: 'Full message content sent in the notification payload',
},
{
value: 'id_loaded',
display_name: t('admin.environment.notifications.pushContents.id_loaded'),
display_name_default: 'Full message content fetched from the server on receipt',
},
],
},
Expand Down
Loading

0 comments on commit a515185

Please sign in to comment.