{"size": 645, "ext": "js", "max_stars_repo_path": "src/components/common/actions.js", "max_stars_repo_name": "boggiedan/lets-talk", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/common/actions.js", "max_issues_repo_name": "boggiedan/lets-talk", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/common/actions.js", "max_forks_repo_name": "boggiedan/lets-talk", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.9705882353, "max_line_length": 64, "alphanum_fraction": 0.6418604651}
import * as types from "./actionTypes";

export const registerUser = username => ({
  type: types.REGISTER_USER,
  payload: {
    data: username
  }
});

export const updateUserSettings = settings => ({
  type: types.UPDATE_USER_SETTINGS,
  payload: {
    data: settings
  }
});

export const sendMessage = (username, userId, message) => ({
  type: types.SEND_MESSAGE,
  payload: {
    data: {
      value: message,
      username,
      userId
    }
  }
});

export const getMessages = () => ({ type: types.GET_MESSAGES });

export const updateUserPosition = position => ({
  type: types.UPDATE_USER_POSITION,
  payload: { data: position }
});
