I know it’s already solved, but instead of accessing localstorage directly like this, if you are able to access the plugin services from a theme, you can do:
export default {
name: "default-full-page-chat",
initialize(container) {
const chat = container.lookup("service:chat");
if (!chat.userCanChat) {
return;
}
const chatStateManager = container.lookup("service:chat-state-manager");
chatStateManager.prefersFullPage();
},
};
Which calls this:
This would be more reliable long term, if it works (I haven’t tested this ).