mattermost / mattermost-redux Goto Github PK
View Code? Open in Web Editor NEWRedux for Mattermost
License: Apache License 2.0
Redux for Mattermost
License: Apache License 2.0
report mattermost-redux/utils/user_utils.jsx not found error when build Mattermost-webapp
OS X 10.14.4
cd /path/to/mattermost/mattermost-webapp/
sudo npm install --unsafe-perm --allow-root
sudo npm run build
[/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/mattermost-redux/utils/user_utils.jsx]
@ ./components/user_settings/security/user_access_token_section/user_access_token_section.jsx 39:0-63 195:11-34
@ ./components/user_settings/security/user_access_token_section/index.js
@ ./components/user_settings/security/user_settings_security.jsx
@ ./components/user_settings/security/index.js
@ ./components/user_settings/user_settings.jsx
@ ./node_modules/babel-loader/lib??ref--4!./components/user_settings/index.js
@ ./node_modules/bundle-loader?lazy!./components/user_settings/index.js
@ ./components/user_settings/modal/user_settings_modal.jsx
@ ./components/user_settings/modal/index.js
@ ./components/profile_popover/profile_popover.jsx
@ ./components/profile_popover/index.js
@ ./components/at_mention/at_mention.jsx
@ ./components/at_mention/index.jsx
@ ./utils/message_html_to_component.jsx
@ ./plugins/export.js
@ ./components/root/root.jsx
@ ./node_modules/babel-loader/lib??ref--4!./components/root/index.js
@ ./node_modules/bundle-loader?lazy!./components/root/index.js
@ ./root.jsx
@ multi @babel/polyfill whatwg-fetch url-search-params-polyfill ./root.jsx root.html
ERROR in ./utils/utils.jsx
Module not found: Error: Can't resolve 'mattermost-redux/utils/user_utils' in '/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/utils'
resolve 'mattermost-redux/utils/user_utils' in '/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/utils'
Parsed request is a module
using description file: /Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/package.json (relative path: ./utils)
resolve as module
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/utils/node_modules doesn't exist or is not a directory
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/utils/non_npm_dependencies doesn't exist or is not a directory
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/node_modules doesn't exist or is not a directory
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/non_npm_dependencies doesn't exist or is not a directory
/Users/zack/godev_centos_docker/go/src/github.com/node_modules doesn't exist or is not a directory
/Users/zack/godev_centos_docker/go/src/github.com/non_npm_dependencies doesn't exist or is not a directory
/Users/zack/godev_centos_docker/go/src/node_modules doesn't exist or is not a directory
/Users/zack/godev_centos_docker/go/src/non_npm_dependencies doesn't exist or is not a directory
/Users/zack/godev_centos_docker/go/node_modules doesn't exist or is not a directory
/Users/zack/godev_centos_docker/go/non_npm_dependencies doesn't exist or is not a directory
/Users/zack/godev_centos_docker/node_modules doesn't exist or is not a directory
/Users/zack/godev_centos_docker/non_npm_dependencies doesn't exist or is not a directory
/Users/zack/node_modules doesn't exist or is not a directory
/Users/zack/non_npm_dependencies doesn't exist or is not a directory
/Users/node_modules doesn't exist or is not a directory
/Users/non_npm_dependencies doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
/non_npm_dependencies doesn't exist or is not a directory
looking for modules in /Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/node_modules
using description file: /Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/package.json (relative path: ./node_modules)
using description file: /Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/node_modules/mattermost-redux/package.json (relative path: ./utils/user_utils)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/node_modules/mattermost-redux/utils/user_utils doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/node_modules/mattermost-redux/utils/user_utils.js doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
looking for modules in /Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/non_npm_dependencies
using description file: /Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/package.json (relative path: ./non_npm_dependencies)
using description file: /Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/package.json (relative path: ./non_npm_dependencies/mattermost-redux/utils/user_utils)
no extension
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/non_npm_dependencies/mattermost-redux/utils/user_utils doesn't exist
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/node_modules/mattermost-redux/utils/user_utils.jsx doesn't exist
.js
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/non_npm_dependencies/mattermost-redux/utils/user_utils.js doesn't exist
as directory
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/node_modules/mattermost-redux/utils/user_utils doesn't exist
.jsx
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/non_npm_dependencies/mattermost-redux/utils/user_utils.jsx doesn't exist
as directory
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/non_npm_dependencies/mattermost-redux/utils/user_utils doesn't exist
looking for modules in /Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp
using description file: /Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/package.json (relative path: .)
using description file: /Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/package.json (relative path: ./mattermost-redux/utils/user_utils)
no extension
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/mattermost-redux/utils/user_utils doesn't exist
.js
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/mattermost-redux/utils/user_utils.js doesn't exist
.jsx
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/mattermost-redux/utils/user_utils.jsx doesn't exist
as directory
/Users/zack/godev_centos_docker/go/src/github.com/mattermost/mattermost-webapp/mattermost-redux/utils/user_utils doesn't exist
checked the Mattermost-redux in node_modules, the utils folder is inside src, so the correct path is /path/to/mattermost/mattermost-webapp/node_modules/mattermost-redux/src/utils/user_utils.jsx
====================
its okay in my windows 10, and the path is correct in node_modules, such as /path/to/mattermost/mattermost-webapp/node_modules/mattermost-redux/utils/user_utils.jsx
its okay after
run npm cache clean --force
on my Mac os X
# in mattermost-webapp folder
npm install
# go to install dependencies manually for mattermost-redux
cd node_modules/mattermost-redux
npm install
cd ../..
# then build success
npm run build
CORS seem to fail with Client4
although mattermost-server has AllowCorsFrom
set to "*"
Try to call Client4.getMe()
Getting the results from the server.
Chrome says: Failed to load http://localhost:8065/api/v4/users/me: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. Origin 'http://localhost:8081' is therefore not allowed access.
A simple test posted here:
mattermost/mattermost#8687
using fetch
(fetch('http://localhost:8065/api/v4/system/ping')
) works.
Update to isomorphic-fetch 3.x to resolve vulnerability in transitive dependency node-fetch 1.7.3
Run npm audit
in a project that has "mattermost-redux": "5.28.1"
as dependency.
There are no security vulnerabilities related to mattermost-redux.
A vulnerability is indicated that cannot be resolved automatically:
Low Denial of Service
Package node-fetch
Patched in >=2.6.1 <3.0.0-beta.1|| >= 3.0.0-beta.9
Dependency of mattermost-redux
Path mattermost-redux > isomorphic-fetch > node-fetch
More info https://npmjs.com/advisories/1556
Update isomorphic-fetch
to latest version.
Issue in one concise sentence.
The latest npm project mattermost-redux(v1.2.0) is not sync with the latest code(now at tag v5.2.0).
The npm project is sync with the github code or mention Please don't use npm since they are not maintained
in Readme file.
Thank you! I want to mention that because it takes time to figure it out.
Rudderlabs cookies set on domain .example.com
, not on mattermost.example.com
.
Install Mattermost on a server. Use a subdomain, e.g. https://mattermost.example.com
. Visit that domain. Observe that the JS application (the 5MB main.js
) sets two cookies, rl_user_id
and rl_anonymous_id
for the domain .example.com
.
Now visit https://example.com
, or https://gitlab.example.com
. Observe the same cookies sent to these domains as well.
Bonus: have a development machine reachable at http://dev-42.vpn.example.com
. Observe a lot of warnings for these cookies.
The Rudderlabs cookies should only be set for mattermost.example.com
.
See above. The cookies are setup to be tracking cookies for the whole domain, including all subdomains.
Confine Rudderlabs cookies to the (sub) domain Mattermost is installed on.
If that's not possible, remove Rudderlabs altogether.
If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide, specifically for machine setup and for developer workflow.
Notes: Jira ticket
If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide, specifically for machine setup and for developer workflow.
Notes: Jira ticket
Recent version bump (d4b6552) to serialize-errors
prevents RN app from running.
mattermost-redux: With current HEAD on master
(2289b68):
make clean
make
mattermost-mobile: With current HEAD on master
(mattermost/mattermost-mobile@e5e3bcc):
make clean
make pre-run
make run-ios/run-android
With these steps, the mobile app should fail when building bundle with the following redbox:
So, this recent commit prevents RN app master
from building, if it is pointed to latest mattermost-redux commit.
We've had the same issue before, but this time I can't just do a simple revert because there's a pre-commit hook fails the implicit anys
rule for library dependencies. This prevents the serialize-error
library from going back to an older version.
I'm looking at options, including possibly removing serialize-error
, but this is a more involved effort. Another option could be to somehow not run the pre-commit hook on dependency libraries?
If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide, specifically for machine setup and for developer workflow.
Notes: Jira ticket
If you don't have the chrome extension Redux Dev Tools installed you get a whole bunch of errors (see below) that cause the webapp to "explode" in development.
Install the webapp dev environment without Redux Dev Tools installed.
Would be nice to have this disabled by default and or more gracefully handle these errors.
Error messages (see screenshot above).
In configureStore.dev.js there is a bunch of stuff regarding remote-redux-devtools
. More specifically look into disabling the tools if window.__REDUX_DEVTOOLS_EXTENSION__
doesn't exist. See these lines of code:
mattermost-redux/src/store/configureStore.dev.js
Lines 15 to 23 in e2b6126
Submit feature requests to http://www.mattermost.org/feature-requests/. File non-security related bugs here in the following format:
How to remove / delete a uploaded file from mattermost-server ?
Upload file
mattermostClient.uploadFile(imageFormData)
Get file
mattermostClient.getFile(fileId)
There is function available for delete the file
Upload file
mattermostClient.uploadFile(imageFormData)
Get file
mattermostClient.getFile(fileId)
Remove file
mattermostClient.removeFile(fileId)
There is no function to do this task.
If you can, link to the line of code that might be responsible for the problem.
Calling the "login" method does not set the token (anymore?).
The example in the readme suggests that it should:
client.setUrl('https://your-mattermost-url.com');
client.login(username, password)
.then(function(me){
console.log(`logged in as ${me.email}`);
token = client.getToken(); // empty!
})
Execute the example code with valid server URL and credentials (username and password).
I expect the token to be stored in the client.
If the login is done with a password, the token received from Mattermost server in response header should be saved.
If the login is done with a token, the used token should be saved.
Subsequent API actions want me to authenticate again. I can't use the API using this library with username and password.
I guess somewhere around https://github.com/mattermost/mattermost-redux/blob/master/src/client/client4.ts#L658, but I don't know where to get the response header.
My current workaround: Send a separate login via Axios to get the token.
It looks like redux-offline
was already removed from the web app, so the actions in this package relying on it don't work anymore.
mattermost-enterprise-edition:5.35.0
5.33.1
Create a plugin that uses the createPost
action or any other action that depended on redux-offline
.
No API request to create the post is sent, and the post stays pending indefinitely on the creating client's side.
The API request to create the post is sent, the post is persistet and visible for all members of the channel.
If I'm not mistaken, this problem is caused by removing redux-offline
in these PRs:
and changing mattermost-webapp
to use its own version in this PR: mattermost/mattermost-webapp#7723
While I get the point of doing this, it looks like there was never a release of mattermost-redux
that also removes redux-offline
, as it's still bundled in the latest 5.33.1
release. This breaks plugins that e.g. use createPost
from mattermost-redux
, as the code still includes this part:
// ...
dispatch({
type: action_types_1.PostTypes.RECEIVED_NEW_POST,
data: tslib_1.__assign(tslib_1.__assign({}, newPost), { id: pendingPostId }),
meta: {
offline: {
effect: function () {
return client_1.Client4.createPost(tslib_1.__assign(tslib_1.__assign({}, newPost), { create_at: 0 }));
},
// ...
As redux-offline
was removed from the web app and doesn't look to be bundled with mattermost-redux
, the meta.offline
part is simply never executed.
This could be somewhat "fixed" by releasing this change for mattermost-redux
, however that would still mean plugins relying on these actions that are not updated would remain broken.
Addendum: I can comfirm that building mattermost-redux
from the current master
of this repo and using those files instead of npm install
ing mattermost-redux
in a plugin successfully works around this issue - not the best idea tho, IMO.
Can we add GetTeamByTeamname functionality to client4? Can I do it and open a pull request?
Installation of mattermost-redux fails due to git dependency.
The module should install without error.
The issue occurs if you want to install a package (for example an cli) which uses mattermost-redux globally.
npm ERR! code 128
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master https://github.com/enahum/redux-offline.git /root/.npm/_cacache/tmp/git-clone-f7f32218
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-f7f32218': Permission denied
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-02-12T14_40_06_244Z-debug.log
redux-offline
dependency as git based dependency. If you must use your own version of this package, at least publish it to npm.mattermost-redux
into different packages. The idea with npm is that packages are small. This package now contains both the client and usages of the client. I propose to at least create mattermost-http-client
and mattermost-ws-client
as packages. Note: you can still keep the code in one repo.login error
When I try to login, it go wrong.
App launches successfully.
Cannot logined Mattermost Server.
code:
async loginAndGetUser(username, password) {
try {
await Client4.login(username, password);
} catch (error) {
console.error('====login=======' , error);
return null;
}
let user;
try {
user = await Client4.getMe();
} catch (error) {
console.error('=====getMe========', error);
return null;
}
return user;
}
09-20 17:48:46.898 21364 21453 E ReactNativeJS: '====login=======', { [ReferenceError: Can't find variable: Reflect]
09-20 17:48:46.898 21364 21453 E ReactNativeJS: line: 55746,
09-20 17:48:46.898 21364 21453 E ReactNativeJS: column: 19,
09-20 17:48:46.898 21364 21453 E ReactNativeJS: sourceURL: 'http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false' }
Submit feature requests to http://www.mattermost.org/feature-requests/. File non-security related bugs here in the following format:
I confused why the timestamp of messages based on platform? (only if the login user is admin)
mattermost-redux/src/actions/posts.js
const timestamp = Date.now();
...
create_at: timestamp,
update_at: timestamp
The timestamp of this Message is based on iPhone's not sever's
Submit feature requests to http://www.mattermost.org/feature-requests/. File non-security related bugs here in the following format:
When I try to use the slash command like so: /join ~off-topic
it fails.
/join ~off-topic
/join command works. Please note that it DOES work if you do /join off-topic
.
It seems likely to me it has something to do with the logic here: https://github.com/mattermost/mattermost-redux/blob/master/src/actions/channels.js#L664 where if it gets the channel name it does one thing (which I think is the case that works) and if it gets the channel id (which it makes sense if you use tilde then it finds the channel id and tries to post that instead) it does another thing. Why it's trying to list members first before adding (which is what it seems to be doing) I don't know.
Related issue:
mattermost/mattermost#16734
mattermost-redux/src/actions/groups.ts
Line 196 in 7cd02e3
filterAllowReference
and includeMemberCount
should be of type boolean
?
mattermost-redux/src/types/groups.ts
Line 11 in 7cd02e3
scheme_admin
prop should be optional?Hi.
The official redux-offline
package has been renamed to
@redux-offline/redux-offline and seems to be under development.
Line 35 in d5f581c
How about use this?
Testing
Is there any reason for Mattermost still using es2015 and stage-0?
babeljs recommends to use env instead.
and it makes we can use native es2015+ by targeting supported browsers.
After this PR #582 is merged we have problem in 5.2 if multiple images in same post are uploaded at the same timestamp
For some reason the original postid is "locale". I tried to debug this problem but could not find why the locale is postid. Anyways all images has locale = postid instead of real locale. The problem exists only if two images has exact same timestamp. Then it is trying to do localeCompare in https://github.com/mattermost/mattermost-redux/blob/master/src/utils/file_utils.js#L97 but fails because the locale variable is postid.
npm [email protected] is missing built files
npm install [email protected]
Same basic set of files as for version 5.29.1 which is:
contents of node_modules/mattermost-redux@5.29.1
drwxrwxr-x 2 user user 4096 Feb 23 15:59 action_types/
drwxrwxr-x 2 user user 4096 Feb 23 15:59 actions/
drwxrwxr-x 2 user user 4096 Feb 23 15:59 client/
drwxrwxr-x 2 user user 4096 Feb 23 15:59 constants/
drwxrwxr-x 3 user user 4096 Feb 23 15:59 node_modules/
drwxrwxr-x 5 user user 4096 Feb 23 15:59 reducers/
drwxrwxr-x 3 user user 4096 Feb 23 15:59 selectors/
drwxrwxr-x 11 user user 4096 Feb 23 15:59 src/
drwxrwxr-x 2 user user 4096 Feb 23 15:59 store/
drwxrwxr-x 2 user user 4096 Feb 23 15:59 types/
drwxrwxr-x 2 user user 4096 Feb 23 15:59 utils/
-rw-rw-r-- 1 user user 609 Oct 26 1985 CONTRIBUTING.md
-rw-rw-r-- 1 user user 11399 Oct 26 1985 LICENSE.txt
-rw-rw-r-- 1 user user 30298 Oct 26 1985 NOTICE.txt
-rw-rw-r-- 1 user user 6430 Oct 26 1985 README.md
-rw-rw-r-- 1 user user 2014 Oct 26 1985 SECURITY.md
-rw-rw-r-- 1 user user 205833 Oct 26 1985 mattermost.client4.js
-rw-rw-r-- 1 user user 779845 Oct 26 1985 mattermost.client4.js.map
-rw-rw-r-- 1 user user 4759 Oct 26 1985 mattermost.websocket_client.js
-rw-rw-r-- 1 user user 23716 Oct 26 1985 mattermost.websocket_client.js.map
-rw-rw-r-- 1 user user 4661 Feb 23 15:59 package.json
-rw-rw-r-- 1 user user 1394 Oct 26 1985 rollup.config.js
-rw-rw-r-- 1 user user 2039 Oct 26 1985 tsconfig.json
Although I'm not sure why the src
directory is included in the package.
Notice all of the missing build directories (eg. action_types
, actions
, client
etc.)
contents of node_modules/mattermost-redux@5.29.2
drwxrwxr-x 3 user user 4096 Feb 23 16:40 node_modules/
drwxrwxr-x 11 user user 4096 Feb 23 16:40 src/
-rw-rw-r-- 1 user user 609 Oct 26 1985 CONTRIBUTING.md
-rw-rw-r-- 1 user user 11399 Oct 26 1985 LICENSE.txt
-rw-rw-r-- 1 user user 30298 Oct 26 1985 NOTICE.txt
-rw-rw-r-- 1 user user 6430 Oct 26 1985 README.md
-rw-rw-r-- 1 user user 2014 Oct 26 1985 SECURITY.md
-rw-rw-r-- 1 user user 4661 Feb 23 16:40 package.json
-rw-rw-r-- 1 user user 1394 Oct 26 1985 rollup.config.js
-rw-rw-r-- 1 user user 2039 Oct 26 1985 tsconfig.json
I'm not sure what the normal process that publishes the mattermost_redux package is, but it looks like it was supposed to be built first and wasn't.
The library depends on:
Because working with offline is the responsibility of the mobile application only, I suggest remove offline code from the library.
CORS issue with Client4
, does not allow localhost:3000
to access localhost:8065
.
Seems similar to #557 , but I still can't figure.
localhost:8065
create-react-app
runs on localhost:3000
Client4.getMe()
: import {Client4} from 'mattermost-redux/client';
Client4.setUrl('<https://your-mattermost-url.com>');
async function loginAndGetUser(username, password) {
try {
await Client4.login(username, password);
} catch (error) {
console.error(error);
return null;
}
let user;
try {
user = await Client4.getMe();
} catch (error) {
console.error(error);
return null;
}
return user;
}
Getting the results from the server.
Failed to load http://localhost:8065/api/v4/users/login: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I installed the Allow-Control-Allow-Origin
Chrome extension, and added http://localhost:3000
in the Access-Control-Expose-Header
option.
Then the Chrome error message is:
Failed to load http://localhost:8065/api/v4/users/login: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://localhost:3000' is therefore not allowed access.
I am able to get a response with below, at least I know the server works well:
curl -i -d "{\"login_id\":\"<[email protected]>\",\"password\":\"<MyPassword>\"}" http://localhost:8065/api/v4/users/login
String.localeCompare function is very very slow.
Do V8 devs know about it?
Yes, it's been at their bugtracker for a long time, they won't 'fix' it.
It's used here to sort the channels, which happens very often, for example when switching channels.
I personally have a lot of channels, mainly as archive, but since they are private channels I can't quit them like public channels so they get off the navbar.
(40 navbar items)
It's hard for me to get the exact numbers, but I guarantee it's not less than 10% of channel switch time.
I understand it's there to support Chineese and sorting non-latin stuff but we can at least use a fast regex before calling localeCompare like [a-zA-Z0-9!@#$^&*()] something close to that.
Maybe even a for-each-char loop that checks if the char is within ASCII range.
If not, only then use localeCompare.
This could also be a visible improvement on the mobile app channel switching and I am curious to know this, if you guys have good tooling to check.
Would that be fine?
For now I injected this piece of code to my mattermost-webapp and enjoyed better channel switch time:
String.prototype.localeCompare = function(b) { var a = this; return (a < b ? -1 : (a > b ? 1 : 0));}
How can we reproduce the issue?
Have lots of channels in navbar and switch channel.
Describe your issue in detail.
Channel switching is fast.
What did you see happen? Please include relevant error messages and/or screenshots.
Channel switching is slower than it could be.
If you can, link to the line of code that might be responsible for the problem.
If two strings are within ASCII range use a simple compare and not localeCompare.
Submit feature requests to http://www.mattermost.org/feature-requests/. File non-security related bugs here in the following format:
Issue in one concise sentence.
How can we reproduce the issue?
Describe your issue in detail.
What did you see happen? Please include relevant error messages and/or screenshots.
If you can, link to the line of code that might be responsible for the problem.
mattermost-redux does not take into account Site URL configured in Mattermost Server.
Emojis should be rendered correctly with respect to the Site URL.
URL is generated here: https://github.com/mattermost/mattermost-redux/blob/master/src/utils/emoji_utils.js#L18
Mattermost websocket client (client/websocket_client.js) initialize
method does not resolve its returned promise if a firstConnectCallback
function property is not set.
Using the node.js Usage steps highlighted in the README, add an additional promise chain then
block after the wsClient.initialize
call. The returned promise from initialize
only resolves if a firstConnectCallback
is set.
// ...
.then(function(){
return wsClient.initialize(token, {}, {}, {connectionUrl: 'wss://your-mattermost-url.com/api/v4/websocket'});
})
.then(function() {
console.log('wsClient.initialize method resolved its promise!')
})
// ...
The initialize
method returns a Promise that should resolve when the websocket connection is complete and successful.
Any promise resolve method does not execute when the websocket does successfully finish connecting.
Line 104 in src/client/websocket_client.js
creates a conditional that is ultimately responsible for executing the promise resolve
when the websocket connects, but can only execute if a firstConnectCallback
function is set and exists.
Running React Native app with mattermost-redux fails.
The React Native app should start without error.
error: bundling failed: Error: Unable to resolve module
core-js/modules/web.dom-collections.iterator
from/Users/node_modules/mattermost-redux/store/configureStore.dev.js
: Modulecore-js/modules/web.dom-collections.iterator
does not exist in the Haste module map
Install additional deps
Submit feature requests to http://www.mattermost.org/feature-requests/. File non-security related bugs here in the following format:
type definition of Client4 don't match api definition on api.mattermost.com
Try to make use of the createPost function with a structure only containing:
This is only one example. Another is the mandatory timestamp attribute for the getFileThumbnailUrl and getFileUrl, while neither according to the documentation, nor the javascript code make it mandatory.
Post creation endpoint is invoked.
The code cannot compile since it expects a full post object, including all the date fields (create, update, ...)
Revert to typing of 5.17.0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.