Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

ICU-672 Fix undefined id error #738

Merged
merged 1 commit into from
Feb 7, 2018
Merged

ICU-672 Fix undefined id error #738

merged 1 commit into from
Feb 7, 2018

Conversation

stephenkiers
Copy link
Contributor

@stephenkiers stephenkiers commented Feb 6, 2018

Summary

This fixes a cannot read 'id' of undefined error in webapp. It seems like the issue was old code was refactored, but old code was left in. So I cleaned out the code rot and everything still seems to work.

Ticket Link

https://mattermost.atlassian.net/browse/ICU-672

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Ran make check-style to check for style errors (required for all pull requests)

Youtube video of testing feature still works

https://www.youtube.com/watch?v=oVPdOhNjP3E

@jasonblais jasonblais added this to the v4.7.0 milestone Feb 6, 2018
@jasonblais jasonblais added the 2: Dev Review Requires review by a core commiter label Feb 6, 2018

if (channel) {
GlobalActions.emitChannelClickEvent(channel);
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does removing updateChannel will not cause any side-effect?
Why not just get the channel name from props.match.params and use it accordingly?

    const {team, identifier} = props.match.params;
    const channelName = identifier.toLowerCase();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like it may break the "fake channel" logic, but I don't actually know if that's been used for a long time. We had it in there for when we'd show random users in your DM list on first sign up even if the channels for them didn't exist so that we could create those channels when you did click on them.

I was actually wondering yesterday if we can just remove all that logic since I think that was the only place we used them, and we haven't automatically added DM users for a long time

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. I will remove fake channel logic and retest.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could just make a ticket and go with these changes if they work. The fake channel logic is split across the redux and web app, and it might even be in the mobile app even though that logic was removed probably 2 years ago

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clearing up!

Copy link
Member

@crspeller crspeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. As Harrison pointed out I don't think we need to fake channel logic any more. Also clearly this case is handed somewhere else, judging by your YouTube video.

@esethna
Copy link
Contributor

esethna commented Feb 7, 2018

@stephenkiers please help rebase to release-4.7 as this will go in RC2

@stephenkiers stephenkiers changed the base branch from master to release-4.7 February 7, 2018 19:06
Copy link
Member

@hmhealey hmhealey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're going to make a ticket to remove the rest of the fake channel logic for 4.8

@saturninoabril saturninoabril added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Feb 7, 2018
@GoldUniform GoldUniform merged commit 685cab4 into mattermost:release-4.7 Feb 7, 2018
@GoldUniform GoldUniform removed the 4: Reviews Complete All reviewers have approved the pull request label Feb 7, 2018
@lindalumitchell lindalumitchell added the Tests/Not Needed Does not require new release tests label Feb 9, 2018
@amyblais amyblais added the Docs/Not Needed Does not require documentation label Feb 9, 2018
@amyblais amyblais added the Changelog/Not Needed Does not require a changelog entry label Feb 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Tests/Not Needed Does not require new release tests
Projects
None yet
9 participants