summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/async_client.jsx17
-rw-r--r--webapp/utils/constants.jsx2
-rw-r--r--webapp/utils/utils.jsx10
3 files changed, 24 insertions, 5 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx
index d3f91bb0e..6140fd9e0 100644
--- a/webapp/utils/async_client.jsx
+++ b/webapp/utils/async_client.jsx
@@ -673,9 +673,9 @@ export function getStatuses() {
const preferences = PreferenceStore.getCategory(Constants.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW);
const teammateIds = [];
- for (const preference of preferences) {
- if (preference.value === 'true') {
- teammateIds.push(preference.name);
+ for (const [name, value] of preferences) {
+ if (value === 'true') {
+ teammateIds.push(name);
}
}
@@ -756,6 +756,17 @@ export function getAllPreferences() {
);
}
+export function savePreference(category, name, value, success, error) {
+ const preference = {
+ user_id: UserStore.getCurrentId(),
+ category,
+ name,
+ value
+ };
+
+ savePreferences([preference], success, error);
+}
+
export function savePreferences(preferences, success, error) {
client.savePreferences(
preferences,
diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx
index 872bdb8ab..859348c73 100644
--- a/webapp/utils/constants.jsx
+++ b/webapp/utils/constants.jsx
@@ -83,6 +83,8 @@ export default {
SHOW_SEARCH: null,
+ USER_TYPING: null,
+
TOGGLE_IMPORT_THEME_MODAL: null,
TOGGLE_INVITE_MEMBER_MODAL: null,
TOGGLE_DELETE_POST_MODAL: null,
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index 2e9f2b773..1379455ca 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -314,7 +314,13 @@ export function getTimestamp() {
// extracts links not styled by Markdown
export function extractLinks(text) {
- const links = [];
+ text; // eslint-disable-line no-unused-expressions
+ Autolinker; // eslint-disable-line no-unused-expressions
+
+ // skip this operation because autolinker is having issues
+ return [];
+
+ /*const links = [];
let inText = text;
// strip out code blocks
@@ -348,7 +354,7 @@ export function extractLinks(text) {
}
);
- return links;
+ return links;*/
}
export function escapeRegExp(string) {