diff options
-rw-r--r-- | CHANGELOG.md | 26 | ||||
-rw-r--r-- | model/gitlab/gitlab.go | 27 | ||||
-rw-r--r-- | web/react/components/channel_loader.jsx | 4 | ||||
-rw-r--r-- | web/react/stores/channel_store.jsx | 4 | ||||
-rw-r--r-- | web/react/stores/socket_store.jsx | 6 | ||||
-rw-r--r-- | web/react/utils/async_client.jsx | 2 |
6 files changed, 52 insertions, 17 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index bd9772b2b..8606fc72c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -150,21 +150,31 @@ The following is for informational purposes only, no action needed. Mattermost a #### Known Issues - Navigating to a page with new messages containing inline images added via markdown causes the channel to scroll up and down while loading the inline images. -- Microsoft Edge does not yet support drag and drop for file attachments. +- Microsoft Edge does not yet support drag and drop for file attachments. +- No error message on IE11 when uploading more than 5 files or a file over 50 MB. +- File name tooltip stays open after clicking to download. - Scroll bar does not appear in the center channel. - Unable to paste images into the text box on Firefox, Safari, and IE11. -- Importing from Slack fails to load messages in certain cases and breaks @mentions. -- System Console > TEAMS > Statistics > Newly Created Users shows all users as created "just now". -- Favicon does not turn red when @mentions and direct messages are received in an inactive browser tab. +- Importing from Slack fails to load channels in certain cases. +- System Console > Teams > Statistics > Newly Created Users shows all users as created "just now". +- Username and email display on single line in System Console user management tab. - Searching for a phrase in quotations returns more than just the phrase on installations with a Postgres database. - Archived channels are not removed from the "More" menu for the person that archived the channel until after refresh. +- First load of an empty channel does not display the introduction message. - Search results don't highlight searches for @username, non-latin characters, or terms inside Markdown code blocks. - Searching for a username or hashtag containing a dot returns a search where the dot is replaced with the "or" operator. +- Search term highlighting doesn't update on IE11 when search terms change but return the same posts. - Hashtags less than three characters long are not searchable. -- Users remains in the channel counter after being deactivated. -- Messages with symbols (<,>,-,+,=,%,^,#,*,|) directly before or after a hashtag are not searchable. -- Permalinks for the second message or later consecutively sent in a group by the same author displaces the copy link popover or causes an error -- Emoji smileys ending with a letter at the end of a message do not auto-complete as expected +- Hashtags containing a dash incorrectly highlight in the search results. +- Users remain in the channel counter after being deactivated. +- Permalinks for the second message or later consecutively sent in a group by the same author displaces the copy link popover or causes an error. +- Emoji smileys ending with a letter at the end of a message do not auto-complete as expected. +- Logout slash command does not force a logout. +- Incorrect formatting when a new line is added directly after a list. +- Timestamps are displayed in 12-hour format when set to 24-hour format. +- GIF links inside code blocks auto-post the GIFs. +- Syntax highlighting code block is missing the label for Latex documents. +- Deleted messages don't delete in the RHS until a page refresh. #### Contributors diff --git a/model/gitlab/gitlab.go b/model/gitlab/gitlab.go index 8b96c64f6..3ca499976 100644 --- a/model/gitlab/gitlab.go +++ b/model/gitlab/gitlab.go @@ -67,6 +67,18 @@ func gitLabUserFromJson(data io.Reader) *GitLabUser { } } +func (glu *GitLabUser) IsValid() bool { + if glu.Id == 0 { + return false + } + + if len(glu.Email) == 0 { + return false + } + + return true +} + func (glu *GitLabUser) getAuthData() string { return strconv.FormatInt(glu.Id, 10) } @@ -76,9 +88,20 @@ func (m *GitLabProvider) GetIdentifier() string { } func (m *GitLabProvider) GetUserFromJson(data io.Reader) *model.User { - return userFromGitLabUser(gitLabUserFromJson(data)) + glu := gitLabUserFromJson(data) + if glu.IsValid() { + return userFromGitLabUser(glu) + } + + return &model.User{} } func (m *GitLabProvider) GetAuthDataFromJson(data io.Reader) string { - return gitLabUserFromJson(data).getAuthData() + glu := gitLabUserFromJson(data) + + if glu.IsValid() { + return glu.getAuthData() + } + + return "" } diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx index 174c8c4e1..f3000ee05 100644 --- a/web/react/components/channel_loader.jsx +++ b/web/react/components/channel_loader.jsx @@ -95,6 +95,8 @@ class ChannelLoader extends React.Component { $(window).on('focus', function windowFocus() { AsyncClient.updateLastViewedAt(); + ChannelStore.resetCounts(ChannelStore.getCurrentId()); + ChannelStore.emitChange(); window.isActive = true; }); @@ -185,4 +187,4 @@ ChannelLoader.propTypes = { intl: intlShape.isRequired }; -export default injectIntl(ChannelLoader);
\ No newline at end of file +export default injectIntl(ChannelLoader); diff --git a/web/react/stores/channel_store.jsx b/web/react/stores/channel_store.jsx index ac800a988..60cb10de7 100644 --- a/web/react/stores/channel_store.jsx +++ b/web/react/stores/channel_store.jsx @@ -308,7 +308,7 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => { ChannelStore.storeChannels(action.channels); ChannelStore.storeChannelMembers(action.members); currentId = ChannelStore.getCurrentId(); - if (currentId && !document.hidden) { + if (currentId && window.isActive) { ChannelStore.resetCounts(currentId); } ChannelStore.setUnreadCounts(); @@ -321,7 +321,7 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => { ChannelStore.pStoreChannelMember(action.member); } currentId = ChannelStore.getCurrentId(); - if (currentId && !document.hidden) { + if (currentId && window.isActive) { ChannelStore.resetCounts(currentId); } ChannelStore.setUnreadCount(action.channel.id); diff --git a/web/react/stores/socket_store.jsx b/web/react/stores/socket_store.jsx index 424c7fe57..efb57e226 100644 --- a/web/react/stores/socket_store.jsx +++ b/web/react/stores/socket_store.jsx @@ -202,10 +202,10 @@ function handleNewPostEvent(msg, translations) { // Update channel state if (ChannelStore.getCurrentId() === msg.channel_id) { - if (document.hidden) { - AsyncClient.getChannel(msg.channel_id); - } else { + if (window.isActive) { AsyncClient.updateLastViewedAt(); + } else { + AsyncClient.getChannel(msg.channel_id); } } else if (UserStore.getCurrentId() !== msg.user_id || post.type !== Constants.POST_TYPE_JOIN_LEAVE) { AsyncClient.getChannel(msg.channel_id); diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx index 45cdf699f..13b57092d 100644 --- a/web/react/utils/async_client.jsx +++ b/web/react/utils/async_client.jsx @@ -549,7 +549,7 @@ export function getPosts(id) { type: ActionTypes.RECEIVED_POSTS, id: channelId, before: true, - numRequested: Constants.POST_CHUNK_SIZE, + numRequested: 0, post_list: data }); |