Merge branch 'master' of https://github.com/mattermost/platform into plt-375
Conflicts: web/react/components/user_settings/user_settings_appearance.jsx
Этот коммит содержится в:
@@ -152,21 +152,23 @@ export function getChannel(id) {
|
||||
}
|
||||
|
||||
export function updateLastViewedAt() {
|
||||
if (isCallInProgress('updateLastViewed')) {
|
||||
const channelId = ChannelStore.getCurrentId();
|
||||
|
||||
if (channelId === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ChannelStore.getCurrentId() == null) {
|
||||
if (isCallInProgress(`updateLastViewed${channelId}`)) {
|
||||
return;
|
||||
}
|
||||
|
||||
callTracker.updateLastViewed = utils.getTimestamp();
|
||||
callTracker[`updateLastViewed${channelId}`] = utils.getTimestamp();
|
||||
client.updateLastViewedAt(
|
||||
ChannelStore.getCurrentId(),
|
||||
function updateLastViewedAtSuccess() {
|
||||
channelId,
|
||||
() => {
|
||||
callTracker.updateLastViewed = 0;
|
||||
},
|
||||
function updateLastViewdAtFailure(err) {
|
||||
(err) => {
|
||||
callTracker.updateLastViewed = 0;
|
||||
dispatchError(err, 'updateLastViewedAt');
|
||||
}
|
||||
@@ -634,4 +636,4 @@ export function getMyTeam() {
|
||||
dispatchError(err, 'getMyTeam');
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,6 +332,20 @@ export function saveConfig(config, success, error) {
|
||||
});
|
||||
}
|
||||
|
||||
export function logClientError(msg) {
|
||||
var l = {};
|
||||
l.level = 'ERROR';
|
||||
l.message = msg;
|
||||
|
||||
$.ajax({
|
||||
url: '/api/v1/admin/log_client',
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
type: 'POST',
|
||||
data: JSON.stringify(l)
|
||||
});
|
||||
}
|
||||
|
||||
export function testEmail(config, success, error) {
|
||||
$.ajax({
|
||||
url: '/api/v1/admin/test_email',
|
||||
@@ -568,16 +582,16 @@ export function updateChannelDesc(data, success, error) {
|
||||
track('api', 'api_channels_desc');
|
||||
}
|
||||
|
||||
export function updateNotifyLevel(data, success, error) {
|
||||
export function updateNotifyProps(data, success, error) {
|
||||
$.ajax({
|
||||
url: '/api/v1/channels/update_notify_level',
|
||||
url: '/api/v1/channels/update_notify_props',
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
type: 'POST',
|
||||
data: JSON.stringify(data),
|
||||
success,
|
||||
error: function onError(xhr, status, err) {
|
||||
var e = handleError('updateNotifyLevel', xhr, status, err);
|
||||
var e = handleError('updateNotifyProps', xhr, status, err);
|
||||
error(e);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -87,8 +87,10 @@ function autolinkUrls(text, tokens) {
|
||||
const linkText = match.getMatchedText();
|
||||
let url = linkText;
|
||||
|
||||
if (url.lastIndexOf('http', 0) !== 0) {
|
||||
url = `http://${linkText}`;
|
||||
if (match.getType() === 'email') {
|
||||
url = `mailto:${url}`;
|
||||
} else if (url.lastIndexOf('http', 0) !== 0) {
|
||||
url = `http://${url}`;
|
||||
}
|
||||
|
||||
const index = tokens.size;
|
||||
|
||||
Ссылка в новой задаче
Block a user