Hi @ali-farooq0 ,
yes I understand this but that is hardcoded in mattermost client and to push something to history object i need to import the same instance of object which is used in client. (and this is impossible to do by plugin side as I know?)
Here is some example: https://pastebin.com/QC0wt7kz even if i update browser history object then nothing changes. Im triggering that push method when some event occurs.
Hi @ali-farooq0
unfortunately window.history.pushState updates url but app doesn’t listen to that changes and channel is not changed. In case of document.location.href channel changes but it refreshes whole page (instead reload only active channel) so it doesn’t satisfied me…
It is possible that in near future will be possible to import original browserHistory object created in main mattermost app or just add some method to mattermost redux which will be responsible for channel change?
Hey @slawek367, ahh that’s really unfortunately. Yes definitely I’ve take an action item to address the underlying issue so something like this doesn’t cause roadblocks in the future.
For anyone else.
This feature is going to be introduced in in coming release v5.22.
Then the WebappUtils property will be exposed to the window object and this holds the instance of browserHistory.
With this the answer from @ali-farooq0 works.
Sorry for double posting, but I found no way to edit my post.