Renamed RECIEVED_* to RECEIVED_*

This commit is contained in:
hmhealey
2016-02-08 10:33:59 -05:00
parent 96cb7345da
commit 2af8614236
27 changed files with 120 additions and 120 deletions

View File

@@ -114,7 +114,7 @@ export default class ChannelHeader extends React.Component {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH_TERM, type: ActionTypes.RECEIVED_SEARCH_TERM,
term: terms, term: terms,
do_search: true, do_search: true,
is_mention_search: true is_mention_search: true

View File

@@ -152,7 +152,7 @@ class CreateComment extends React.Component {
ChannelStore.setChannelMember(member); ChannelStore.setChannelMember(member);
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST, type: ActionTypes.RECEIVED_POST,
post: data post: data
}); });
}.bind(this), }.bind(this),
@@ -216,7 +216,7 @@ class CreateComment extends React.Component {
} }
AppDispatcher.handleViewAction({ AppDispatcher.handleViewAction({
type: ActionTypes.RECIEVED_EDIT_POST, type: ActionTypes.RECEIVED_EDIT_POST,
refocusId: '#reply_textbox', refocusId: '#reply_textbox',
title: this.props.intl.formatMessage(holders.commentTitle), title: this.props.intl.formatMessage(holders.commentTitle),
message: lastPost.message, message: lastPost.message,

View File

@@ -364,7 +364,7 @@ class CreatePost extends React.Component {
var type = (lastPost.root_id && lastPost.root_id.length > 0) ? formatMessage(holders.comment) : formatMessage(holders.post); var type = (lastPost.root_id && lastPost.root_id.length > 0) ? formatMessage(holders.comment) : formatMessage(holders.post);
AppDispatcher.handleViewAction({ AppDispatcher.handleViewAction({
type: ActionTypes.RECIEVED_EDIT_POST, type: ActionTypes.RECEIVED_EDIT_POST,
refocusId: '#post_textbox', refocusId: '#post_textbox',
title: type, title: type,
message: lastPost.message, message: lastPost.message,

View File

@@ -62,12 +62,12 @@ export default class DeletePostModal extends React.Component {
var selectedPost = selectedList.posts[selectedList.order[0]]; var selectedPost = selectedList.posts[selectedList.order[0]];
if ((selectedPost.id === this.state.post.id && !this.state.root_id) || selectedPost.root_id === this.state.post.id) { if ((selectedPost.id === this.state.post.id && !this.state.root_id) || selectedPost.root_id === this.state.post.id) {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH, type: ActionTypes.RECEIVED_SEARCH,
results: null results: null
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST_SELECTED, type: ActionTypes.RECEIVED_POST_SELECTED,
results: null results: null
}); });
} else if (selectedPost.id === this.state.post.id && this.state.root_id) { } else if (selectedPost.id === this.state.post.id && this.state.root_id) {
@@ -76,12 +76,12 @@ export default class DeletePostModal extends React.Component {
delete selectedList.posts[selectedPost.id]; delete selectedList.posts[selectedPost.id];
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST_SELECTED, type: ActionTypes.RECEIVED_POST_SELECTED,
post_list: selectedList post_list: selectedList
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH, type: ActionTypes.RECEIVED_SEARCH,
results: null results: null
}); });
} }

View File

@@ -68,7 +68,7 @@ class EditChannelHeaderModal extends React.Component {
this.onHide(); this.onHide();
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: Constants.ActionTypes.RECIEVED_CHANNEL, type: Constants.ActionTypes.RECEIVED_CHANNEL,
channel channel
}); });
}, },

View File

@@ -82,12 +82,12 @@ export default class Navbar extends React.Component {
var windowWidth = $(window).outerWidth(); var windowWidth = $(window).outerWidth();
if (windowWidth <= 768) { if (windowWidth <= 768) {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH, type: ActionTypes.RECEIVED_SEARCH,
results: null results: null
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST_SELECTED, type: ActionTypes.RECEIVED_POST_SELECTED,
results: null results: null
}); });

View File

@@ -31,12 +31,12 @@ export default class Post extends React.Component {
data.posts = this.props.posts; data.posts = this.props.posts;
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST_SELECTED, type: ActionTypes.RECEIVED_POST_SELECTED,
post_list: data post_list: data
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH, type: ActionTypes.RECEIVED_SEARCH,
results: null results: null
}); });
} }
@@ -59,7 +59,7 @@ export default class Post extends React.Component {
ChannelStore.setChannelMember(member); ChannelStore.setChannelMember(member);
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST, type: ActionTypes.RECEIVED_POST,
post: data post: data
}); });
}, },

View File

@@ -24,19 +24,19 @@ export default class PostDeletedModal extends React.Component {
} }
handleClose() { handleClose() {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH, type: ActionTypes.RECEIVED_SEARCH,
results: null results: null
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH_TERM, type: ActionTypes.RECEIVED_SEARCH_TERM,
term: null, term: null,
do_search: false, do_search: false,
is_mention_search: false is_mention_search: false
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST_SELECTED, type: ActionTypes.RECEIVED_POST_SELECTED,
results: null results: null
}); });
} }

View File

@@ -49,7 +49,7 @@ class RhsComment extends React.Component {
ChannelStore.setChannelMember(member); ChannelStore.setChannelMember(member);
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST, type: ActionTypes.RECEIVED_POST,
post: data post: data
}); });
}, },

View File

@@ -21,12 +21,12 @@ export default class RhsHeaderPost extends React.Component {
e.preventDefault(); e.preventDefault();
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH, type: ActionTypes.RECEIVED_SEARCH,
results: null results: null
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST_SELECTED, type: ActionTypes.RECEIVED_POST_SELECTED,
results: null results: null
}); });
} }
@@ -34,14 +34,14 @@ export default class RhsHeaderPost extends React.Component {
e.preventDefault(); e.preventDefault();
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH_TERM, type: ActionTypes.RECEIVED_SEARCH_TERM,
term: this.props.fromSearch, term: this.props.fromSearch,
do_search: true, do_search: true,
is_mention_search: this.props.isMentionSearch is_mention_search: this.props.isMentionSearch
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST_SELECTED, type: ActionTypes.RECEIVED_POST_SELECTED,
results: null results: null
}); });
} }

View File

@@ -74,19 +74,19 @@ class SearchBar extends React.Component {
e.preventDefault(); e.preventDefault();
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH, type: ActionTypes.RECEIVED_SEARCH,
results: null results: null
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH_TERM, type: ActionTypes.RECEIVED_SEARCH_TERM,
term: null, term: null,
do_search: false, do_search: false,
is_mention_search: false is_mention_search: false
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST_SELECTED, type: ActionTypes.RECEIVED_POST_SELECTED,
results: null results: null
}); });
} }
@@ -117,7 +117,7 @@ class SearchBar extends React.Component {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH, type: ActionTypes.RECEIVED_SEARCH,
results: data, results: data,
is_mention_search: isMentionSearch is_mention_search: isMentionSearch
}); });

View File

@@ -19,19 +19,19 @@ export default class SearchResultsHeader extends React.Component {
e.preventDefault(); e.preventDefault();
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH, type: ActionTypes.RECEIVED_SEARCH,
results: null results: null
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH_TERM, type: ActionTypes.RECEIVED_SEARCH_TERM,
term: null, term: null,
do_search: false, do_search: false,
is_mention_search: false is_mention_search: false
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST_SELECTED, type: ActionTypes.RECEIVED_POST_SELECTED,
results: null results: null
}); });
} }

View File

@@ -84,7 +84,7 @@ class ImportThemeModal extends React.Component {
Client.updateUser(user, Client.updateUser(user,
(data) => { (data) => {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_ME, type: ActionTypes.RECEIVED_ME,
me: data me: data
}); });

View File

@@ -107,7 +107,7 @@ export default class ThemeSetting extends React.Component {
Client.updateUser(user, Client.updateUser(user,
(data) => { (data) => {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_ME, type: ActionTypes.RECEIVED_ME,
me: data me: data
}); });

View File

@@ -30,7 +30,7 @@ export function emitPostFocusEvent(postId) {
postId, postId,
(data) => { (data) => {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_FOCUSED_POST, type: ActionTypes.RECEIVED_FOCUSED_POST,
postId, postId,
post_list: data post_list: data
}); });
@@ -47,13 +47,13 @@ export function emitPostFocusRightHandSideFromSearch(post, isMentionSearch) {
post.id, post.id,
(data) => { (data) => {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST_SELECTED, type: ActionTypes.RECEIVED_POST_SELECTED,
post_list: data, post_list: data,
from_search: SearchStore.getSearchTerm() from_search: SearchStore.getSearchTerm()
}); });
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH, type: ActionTypes.RECEIVED_SEARCH,
results: null, results: null,
is_mention_search: isMentionSearch is_mention_search: isMentionSearch
}); });
@@ -89,7 +89,7 @@ export function emitLoadMorePostsFocusedBottomEvent() {
export function emitPostRecievedEvent(post) { export function emitPostRecievedEvent(post) {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POST, type: ActionTypes.RECEIVED_POST,
post post
}); });
} }
@@ -177,7 +177,7 @@ export function emitClearSuggestions(suggestionId) {
export function emitPreferenceChangedEvent(preference) { export function emitPreferenceChangedEvent(preference) {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: Constants.ActionTypes.RECIEVED_PREFERENCE, type: Constants.ActionTypes.RECEIVED_PREFERENCE,
preference preference
}); });
} }

View File

@@ -135,19 +135,19 @@ AdminStoreClass.dispatchToken = AppDispatcher.register((payload) => {
var action = payload.action; var action = payload.action;
switch (action.type) { switch (action.type) {
case ActionTypes.RECIEVED_LOGS: case ActionTypes.RECEIVED_LOGS:
AdminStore.saveLogs(action.logs); AdminStore.saveLogs(action.logs);
AdminStore.emitLogChange(); AdminStore.emitLogChange();
break; break;
case ActionTypes.RECIEVED_SERVER_AUDITS: case ActionTypes.RECEIVED_SERVER_AUDITS:
AdminStore.saveAudits(action.audits); AdminStore.saveAudits(action.audits);
AdminStore.emitAuditChange(); AdminStore.emitAuditChange();
break; break;
case ActionTypes.RECIEVED_CONFIG: case ActionTypes.RECEIVED_CONFIG:
AdminStore.saveConfig(action.config); AdminStore.saveConfig(action.config);
AdminStore.emitConfigChange(); AdminStore.emitConfigChange();
break; break;
case ActionTypes.RECIEVED_ALL_TEAMS: case ActionTypes.RECEIVED_ALL_TEAMS:
AdminStore.saveAllTeams(action.teams); AdminStore.saveAllTeams(action.teams);
AdminStore.emitAllTeamsChange(); AdminStore.emitAllTeamsChange();
break; break;

View File

@@ -296,7 +296,7 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => {
ChannelStore.emitChange(); ChannelStore.emitChange();
break; break;
case ActionTypes.RECIEVED_FOCUSED_POST: { case ActionTypes.RECEIVED_FOCUSED_POST: {
const post = action.post_list.posts[action.postId]; const post = action.post_list.posts[action.postId];
ChannelStore.setCurrentId(post.channel_id); ChannelStore.setCurrentId(post.channel_id);
ChannelStore.setPostMode(ChannelStore.POST_MODE_FOCUS); ChannelStore.setPostMode(ChannelStore.POST_MODE_FOCUS);
@@ -304,7 +304,7 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => {
break; break;
} }
case ActionTypes.RECIEVED_CHANNELS: case ActionTypes.RECEIVED_CHANNELS:
ChannelStore.storeChannels(action.channels); ChannelStore.storeChannels(action.channels);
ChannelStore.storeChannelMembers(action.members); ChannelStore.storeChannelMembers(action.members);
currentId = ChannelStore.getCurrentId(); currentId = ChannelStore.getCurrentId();
@@ -315,7 +315,7 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => {
ChannelStore.emitChange(); ChannelStore.emitChange();
break; break;
case ActionTypes.RECIEVED_CHANNEL: case ActionTypes.RECEIVED_CHANNEL:
ChannelStore.pStoreChannel(action.channel); ChannelStore.pStoreChannel(action.channel);
if (action.member) { if (action.member) {
ChannelStore.pStoreChannelMember(action.member); ChannelStore.pStoreChannelMember(action.member);
@@ -328,12 +328,12 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => {
ChannelStore.emitChange(); ChannelStore.emitChange();
break; break;
case ActionTypes.RECIEVED_MORE_CHANNELS: case ActionTypes.RECEIVED_MORE_CHANNELS:
ChannelStore.storeMoreChannels(action.channels); ChannelStore.storeMoreChannels(action.channels);
ChannelStore.emitMoreChange(); ChannelStore.emitMoreChange();
break; break;
case ActionTypes.RECIEVED_CHANNEL_EXTRA_INFO: case ActionTypes.RECEIVED_CHANNEL_EXTRA_INFO:
var extraInfos = ChannelStore.getExtraInfos(); var extraInfos = ChannelStore.getExtraInfos();
extraInfos[action.extra_info.id] = action.extra_info; extraInfos[action.extra_info.id] = action.extra_info;
ChannelStore.storeExtraInfos(extraInfos); ChannelStore.storeExtraInfos(extraInfos);

View File

@@ -57,7 +57,7 @@ var ErrorStore = new ErrorStoreClass();
ErrorStore.dispatchToken = AppDispatcher.register((payload) => { ErrorStore.dispatchToken = AppDispatcher.register((payload) => {
var action = payload.action; var action = payload.action;
switch (action.type) { switch (action.type) {
case ActionTypes.RECIEVED_ERROR: case ActionTypes.RECEIVED_ERROR:
ErrorStore.storeLastError(action.err); ErrorStore.storeLastError(action.err);
ErrorStore.emitChange(); ErrorStore.emitChange();
break; break;

View File

@@ -49,7 +49,7 @@ class FileStore extends EventEmitter {
const action = payload.action; const action = payload.action;
switch (action.type) { switch (action.type) {
case ActionTypes.RECIEVED_FILE_INFO: case ActionTypes.RECEIVED_FILE_INFO:
this.setInfo(action.filename, action.info); this.setInfo(action.filename, action.info);
this.emitChange(action.filename); this.emitChange(action.filename);
break; break;

View File

@@ -540,23 +540,23 @@ PostStore.dispatchToken = AppDispatcher.register((payload) => {
var action = payload.action; var action = payload.action;
switch (action.type) { switch (action.type) {
case ActionTypes.RECIEVED_POSTS: { case ActionTypes.RECEIVED_POSTS: {
const id = PostStore.currentFocusedPostId == null ? action.id : PostStore.currentFocusedPostId; const id = PostStore.currentFocusedPostId == null ? action.id : PostStore.currentFocusedPostId;
PostStore.checkBounds(id, action.numRequested, makePostListNonNull(action.post_list), action.before); PostStore.checkBounds(id, action.numRequested, makePostListNonNull(action.post_list), action.before);
PostStore.storePosts(id, makePostListNonNull(action.post_list)); PostStore.storePosts(id, makePostListNonNull(action.post_list));
PostStore.emitChange(); PostStore.emitChange();
break; break;
} }
case ActionTypes.RECIEVED_FOCUSED_POST: case ActionTypes.RECEIVED_FOCUSED_POST:
PostStore.clearChannelVisibility(action.postId, false); PostStore.clearChannelVisibility(action.postId, false);
PostStore.storeFocusedPost(action.postId, makePostListNonNull(action.post_list)); PostStore.storeFocusedPost(action.postId, makePostListNonNull(action.post_list));
PostStore.emitChange(); PostStore.emitChange();
break; break;
case ActionTypes.RECIEVED_POST: case ActionTypes.RECEIVED_POST:
PostStore.storePost(action.post); PostStore.storePost(action.post);
PostStore.emitChange(); PostStore.emitChange();
break; break;
case ActionTypes.RECIEVED_EDIT_POST: case ActionTypes.RECEIVED_EDIT_POST:
PostStore.emitEditPost(action); PostStore.emitEditPost(action);
PostStore.emitChange(); PostStore.emitChange();
break; break;
@@ -577,7 +577,7 @@ PostStore.dispatchToken = AppDispatcher.register((payload) => {
PostStore.removePost(action.post); PostStore.removePost(action.post);
PostStore.emitChange(); PostStore.emitChange();
break; break;
case ActionTypes.RECIEVED_POST_SELECTED: case ActionTypes.RECEIVED_POST_SELECTED:
PostStore.storeSelectedPost(action.post_list); PostStore.storeSelectedPost(action.post_list);
PostStore.emitSelectedPostChange(action.from_search); PostStore.emitSelectedPostChange(action.from_search);
break; break;

View File

@@ -159,13 +159,13 @@ class PreferenceStoreClass extends EventEmitter {
const action = payload.action; const action = payload.action;
switch (action.type) { switch (action.type) {
case ActionTypes.RECIEVED_PREFERENCE: { case ActionTypes.RECEIVED_PREFERENCE: {
const preference = action.preference; const preference = action.preference;
this.setPreference(preference.category, preference.name, preference.value); this.setPreference(preference.category, preference.name, preference.value);
this.emitChange(); this.emitChange();
break; break;
} }
case ActionTypes.RECIEVED_PREFERENCES: case ActionTypes.RECEIVED_PREFERENCES:
this.setPreferences(action.preferences); this.setPreferences(action.preferences);
this.emitChange(); this.emitChange();
break; break;

View File

@@ -119,11 +119,11 @@ SearchStore.dispatchToken = AppDispatcher.register((payload) => {
var action = payload.action; var action = payload.action;
switch (action.type) { switch (action.type) {
case ActionTypes.RECIEVED_SEARCH: case ActionTypes.RECEIVED_SEARCH:
SearchStore.storeSearchResults(action.results, action.is_mention_search); SearchStore.storeSearchResults(action.results, action.is_mention_search);
SearchStore.emitSearchChange(); SearchStore.emitSearchChange();
break; break;
case ActionTypes.RECIEVED_SEARCH_TERM: case ActionTypes.RECEIVED_SEARCH_TERM:
SearchStore.storeSearchTerm(action.term); SearchStore.storeSearchTerm(action.term);
SearchStore.emitSearchTermChange(action.do_search, action.is_mention_search); SearchStore.emitSearchTermChange(action.do_search, action.is_mention_search);
break; break;

View File

@@ -116,7 +116,7 @@ TeamStore.dispatchToken = AppDispatcher.register((payload) => {
var action = payload.action; var action = payload.action;
switch (action.type) { switch (action.type) {
case ActionTypes.RECIEVED_TEAM: case ActionTypes.RECEIVED_TEAM:
TeamStore.saveTeam(action.team); TeamStore.saveTeam(action.team);
TeamStore.emitChange(); TeamStore.emitChange();
break; break;

View File

@@ -336,27 +336,27 @@ UserStore.dispatchToken = AppDispatcher.register((payload) => {
var action = payload.action; var action = payload.action;
switch (action.type) { switch (action.type) {
case ActionTypes.RECIEVED_PROFILES: case ActionTypes.RECEIVED_PROFILES:
UserStore.saveProfiles(action.profiles); UserStore.saveProfiles(action.profiles);
UserStore.emitChange(); UserStore.emitChange();
break; break;
case ActionTypes.RECIEVED_ME: case ActionTypes.RECEIVED_ME:
UserStore.setCurrentUser(action.me); UserStore.setCurrentUser(action.me);
UserStore.emitChange(action.me.id); UserStore.emitChange(action.me.id);
break; break;
case ActionTypes.RECIEVED_SESSIONS: case ActionTypes.RECEIVED_SESSIONS:
UserStore.setSessions(action.sessions); UserStore.setSessions(action.sessions);
UserStore.emitSessionsChange(); UserStore.emitSessionsChange();
break; break;
case ActionTypes.RECIEVED_AUDITS: case ActionTypes.RECEIVED_AUDITS:
UserStore.setAudits(action.audits); UserStore.setAudits(action.audits);
UserStore.emitAuditsChange(); UserStore.emitAuditsChange();
break; break;
case ActionTypes.RECIEVED_TEAMS: case ActionTypes.RECEIVED_TEAMS:
UserStore.setTeams(action.teams); UserStore.setTeams(action.teams);
UserStore.emitTeamsChange(); UserStore.emitTeamsChange();
break; break;
case ActionTypes.RECIEVED_STATUSES: case ActionTypes.RECEIVED_STATUSES:
UserStore.pSetStatuses(action.statuses); UserStore.pSetStatuses(action.statuses);
UserStore.emitStatusesChange(); UserStore.emitStatusesChange();
break; break;

View File

@@ -17,7 +17,7 @@ var callTracker = {};
export function dispatchError(err, method) { export function dispatchError(err, method) {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_ERROR, type: ActionTypes.RECEIVED_ERROR,
err: err, err: err,
method: method method: method
}); });
@@ -70,7 +70,7 @@ export function getChannels(checkVersion) {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_CHANNELS, type: ActionTypes.RECEIVED_CHANNELS,
channels: data.channels, channels: data.channels,
members: data.members members: data.members
}); });
@@ -98,7 +98,7 @@ export function getChannel(id) {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_CHANNEL, type: ActionTypes.RECEIVED_CHANNEL,
channel: data.channel, channel: data.channel,
member: data.member member: data.member
}); });
@@ -155,7 +155,7 @@ export function getMoreChannels(force) {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_MORE_CHANNELS, type: ActionTypes.RECEIVED_MORE_CHANNELS,
channels: data.channels, channels: data.channels,
members: data.members members: data.members
}); });
@@ -194,7 +194,7 @@ export function getChannelExtraInfo(id, memberLimit) {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_CHANNEL_EXTRA_INFO, type: ActionTypes.RECEIVED_CHANNEL_EXTRA_INFO,
extra_info: data extra_info: data
}); });
}, },
@@ -221,7 +221,7 @@ export function getProfiles() {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_PROFILES, type: ActionTypes.RECEIVED_PROFILES,
profiles: data profiles: data
}); });
}, },
@@ -248,7 +248,7 @@ export function getSessions() {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SESSIONS, type: ActionTypes.RECEIVED_SESSIONS,
sessions: data sessions: data
}); });
}, },
@@ -275,7 +275,7 @@ export function getAudits() {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_AUDITS, type: ActionTypes.RECEIVED_AUDITS,
audits: data audits: data
}); });
}, },
@@ -301,7 +301,7 @@ export function getLogs() {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_LOGS, type: ActionTypes.RECEIVED_LOGS,
logs: data logs: data
}); });
}, },
@@ -327,7 +327,7 @@ export function getServerAudits() {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SERVER_AUDITS, type: ActionTypes.RECEIVED_SERVER_AUDITS,
audits: data audits: data
}); });
}, },
@@ -353,7 +353,7 @@ export function getConfig() {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_CONFIG, type: ActionTypes.RECEIVED_CONFIG,
config: data config: data
}); });
}, },
@@ -379,7 +379,7 @@ export function getAllTeams() {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_ALL_TEAMS, type: ActionTypes.RECEIVED_ALL_TEAMS,
teams: data teams: data
}); });
}, },
@@ -408,7 +408,7 @@ export function findTeams(email) {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_TEAMS, type: ActionTypes.RECEIVED_TEAMS,
teams: data teams: data
}); });
}, },
@@ -436,7 +436,7 @@ export function search(terms) {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH, type: ActionTypes.RECEIVED_SEARCH,
results: data results: data
}); });
}, },
@@ -488,7 +488,7 @@ export function getPostsPage(id, maxPosts) {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POSTS, type: ActionTypes.RECEIVED_POSTS,
id: channelId, id: channelId,
before: true, before: true,
numRequested: numPosts, numRequested: numPosts,
@@ -538,7 +538,7 @@ export function getPosts(id) {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POSTS, type: ActionTypes.RECEIVED_POSTS,
id: channelId, id: channelId,
before: true, before: true,
numRequested: Constants.POST_CHUNK_SIZE, numRequested: Constants.POST_CHUNK_SIZE,
@@ -577,7 +577,7 @@ export function getPostsBefore(postId, offset, numPost) {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POSTS, type: ActionTypes.RECEIVED_POSTS,
id: channelId, id: channelId,
before: true, before: true,
numRequested: numPost, numRequested: numPost,
@@ -616,7 +616,7 @@ export function getPostsAfter(postId, offset, numPost) {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_POSTS, type: ActionTypes.RECEIVED_POSTS,
id: channelId, id: channelId,
before: false, before: false,
numRequested: numPost, numRequested: numPost,
@@ -649,7 +649,7 @@ export function getMe() {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_ME, type: ActionTypes.RECEIVED_ME,
me: data me: data
}); });
}, },
@@ -685,7 +685,7 @@ export function getStatuses() {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_STATUSES, type: ActionTypes.RECEIVED_STATUSES,
statuses: data statuses: data
}); });
}, },
@@ -711,7 +711,7 @@ export function getMyTeam() {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_TEAM, type: ActionTypes.RECEIVED_TEAM,
team: data team: data
}); });
}, },
@@ -737,7 +737,7 @@ export function getAllPreferences() {
} }
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_PREFERENCES, type: ActionTypes.RECEIVED_PREFERENCES,
preferences: data preferences: data
}); });
}, },
@@ -754,7 +754,7 @@ export function savePreferences(preferences, success, error) {
(data, textStatus, xhr) => { (data, textStatus, xhr) => {
if (xhr.status !== 304) { if (xhr.status !== 304) {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_PREFERENCES, type: ActionTypes.RECEIVED_PREFERENCES,
preferences preferences
}); });
} }
@@ -821,7 +821,7 @@ export function getFileInfo(filename) {
callTracker[callName] = 0; callTracker[callName] = 0;
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_FILE_INFO, type: ActionTypes.RECEIVED_FILE_INFO,
filename, filename,
info: data info: data
}); });

View File

@@ -5,7 +5,7 @@ import keyMirror from 'keymirror';
export default { export default {
ActionTypes: keyMirror({ ActionTypes: keyMirror({
RECIEVED_ERROR: null, RECEIVED_ERROR: null,
CLICK_CHANNEL: null, CLICK_CHANNEL: null,
CREATE_CHANNEL: null, CREATE_CHANNEL: null,
@@ -14,40 +14,40 @@ export default {
POST_DELETED: null, POST_DELETED: null,
REMOVE_POST: null, REMOVE_POST: null,
RECIEVED_CHANNELS: null, RECEIVED_CHANNELS: null,
RECIEVED_CHANNEL: null, RECEIVED_CHANNEL: null,
RECIEVED_MORE_CHANNELS: null, RECEIVED_MORE_CHANNELS: null,
RECIEVED_CHANNEL_EXTRA_INFO: null, RECEIVED_CHANNEL_EXTRA_INFO: null,
FOCUS_POST: null, FOCUS_POST: null,
RECIEVED_POSTS: null, RECEIVED_POSTS: null,
RECIEVED_FOCUSED_POST: null, RECEIVED_FOCUSED_POST: null,
RECIEVED_POST: null, RECEIVED_POST: null,
RECIEVED_EDIT_POST: null, RECEIVED_EDIT_POST: null,
RECIEVED_SEARCH: null, RECEIVED_SEARCH: null,
RECIEVED_SEARCH_TERM: null, RECEIVED_SEARCH_TERM: null,
RECIEVED_POST_SELECTED: null, RECEIVED_POST_SELECTED: null,
RECIEVED_MENTION_DATA: null, RECEIVED_MENTION_DATA: null,
RECIEVED_ADD_MENTION: null, RECEIVED_ADD_MENTION: null,
RECIEVED_PROFILES: null, RECEIVED_PROFILES: null,
RECIEVED_ME: null, RECEIVED_ME: null,
RECIEVED_SESSIONS: null, RECEIVED_SESSIONS: null,
RECIEVED_AUDITS: null, RECEIVED_AUDITS: null,
RECIEVED_TEAMS: null, RECEIVED_TEAMS: null,
RECIEVED_STATUSES: null, RECEIVED_STATUSES: null,
RECIEVED_PREFERENCE: null, RECEIVED_PREFERENCE: null,
RECIEVED_PREFERENCES: null, RECEIVED_PREFERENCES: null,
RECIEVED_FILE_INFO: null, RECEIVED_FILE_INFO: null,
RECIEVED_MSG: null, RECEIVED_MSG: null,
RECIEVED_TEAM: null, RECEIVED_TEAM: null,
RECIEVED_CONFIG: null, RECEIVED_CONFIG: null,
RECIEVED_LOGS: null, RECEIVED_LOGS: null,
RECIEVED_SERVER_AUDITS: null, RECEIVED_SERVER_AUDITS: null,
RECIEVED_ALL_TEAMS: null, RECEIVED_ALL_TEAMS: null,
SHOW_SEARCH: null, SHOW_SEARCH: null,

View File

@@ -490,7 +490,7 @@ export function insertHtmlEntities(text) {
export function searchForTerm(term) { export function searchForTerm(term) {
AppDispatcher.handleServerAction({ AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SEARCH_TERM, type: ActionTypes.RECEIVED_SEARCH_TERM,
term: term, term: term,
do_search: true do_search: true
}); });