correctly send pills in messages

This commit is contained in:
Matthew Hodgson 2018-05-12 20:04:58 +01:00
parent d7c2c8ba7b
commit 9c0c806af4
8 changed files with 159 additions and 63 deletions

View file

@ -44,7 +44,7 @@ class MessageComposerStore extends Store {
__onDispatch(payload) {
switch (payload.action) {
case 'editor_state':
this._contentState(payload);
this._editorState(payload);
break;
case 'on_logged_out':
this.reset();
@ -52,7 +52,7 @@ class MessageComposerStore extends Store {
}
}
_contentState(payload) {
_editorState(payload) {
const editorStateMap = this._state.editorStateMap;
editorStateMap[payload.room_id] = payload.editor_state;
localStorage.setItem('editor_state', JSON.stringify(editorStateMap));
@ -61,7 +61,7 @@ class MessageComposerStore extends Store {
});
}
getContentState(roomId) {
getEditorState(roomId) {
return this._state.editorStateMap[roomId];
}