about summary refs log tree commit diff
path: root/app/assets/javascripts/components/actions/compose.jsx
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-30 21:32:11 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-30 21:34:59 +0100
commit14bd46946d25186044485aa101dd2da976b61181 (patch)
tree94b59b79d06165469a103b9391ddfaee537e0cab /app/assets/javascripts/components/actions/compose.jsx
parent1b447c190eb47117e99ff1e3c754f9cc461202f1 (diff)
Per-status control for unlisted mode, also federation for unlisted mode
Fix #233, fix #268
Diffstat (limited to 'app/assets/javascripts/components/actions/compose.jsx')
-rw-r--r--app/assets/javascripts/components/actions/compose.jsx11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx
index b97cb7b12..c2a7909f6 100644
--- a/app/assets/javascripts/components/actions/compose.jsx
+++ b/app/assets/javascripts/components/actions/compose.jsx
@@ -23,6 +23,7 @@ export const COMPOSE_MOUNT   = 'COMPOSE_MOUNT';
 export const COMPOSE_UNMOUNT = 'COMPOSE_UNMOUNT';
 
 export const COMPOSE_SENSITIVITY_CHANGE = 'COMPOSE_SENSITIVITY_CHANGE';
+export const COMPOSE_VISIBILITY_CHANGE  = 'COMPOSE_VISIBILITY_CHANGE';
 
 export function changeCompose(text) {
   return {
@@ -65,7 +66,8 @@ export function submitCompose() {
       status: getState().getIn(['compose', 'text'], ''),
       in_reply_to_id: getState().getIn(['compose', 'in_reply_to'], null),
       media_ids: getState().getIn(['compose', 'media_attachments']).map(item => item.get('id')),
-      sensitive: getState().getIn(['compose', 'sensitive'])
+      sensitive: getState().getIn(['compose', 'sensitive']),
+      unlisted: getState().getIn(['compose', 'unlisted'])
     }).then(function (response) {
       dispatch(submitComposeSuccess(response.data));
       dispatch(updateTimeline('home', response.data));
@@ -207,3 +209,10 @@ export function changeComposeSensitivity(checked) {
     checked
   };
 };
+
+export function changeComposeVisibility(checked) {
+  return {
+    type: COMPOSE_VISIBILITY_CHANGE,
+    checked
+  };
+};