Merge branch 'mkljczk-develop-patch-61732' into 'develop'
Compose: Only send group_id when not null Closes rebased#184 See merge request soapbox-pub/soapbox!2307
This commit is contained in:
commit
5a90bb4456
|
@ -277,7 +277,7 @@ const submitCompose = (composeId: string, routerHistory?: History, force = false
|
||||||
|
|
||||||
const idempotencyKey = compose.idempotencyKey;
|
const idempotencyKey = compose.idempotencyKey;
|
||||||
|
|
||||||
const params = {
|
const params: Record<string, any> = {
|
||||||
status,
|
status,
|
||||||
in_reply_to_id: compose.in_reply_to,
|
in_reply_to_id: compose.in_reply_to,
|
||||||
quote_id: compose.quote,
|
quote_id: compose.quote,
|
||||||
|
@ -289,9 +289,10 @@ const submitCompose = (composeId: string, routerHistory?: History, force = false
|
||||||
poll: compose.poll,
|
poll: compose.poll,
|
||||||
scheduled_at: compose.schedule,
|
scheduled_at: compose.schedule,
|
||||||
to,
|
to,
|
||||||
group_id: compose.privacy === 'group' ? compose.group_id : null,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (compose.privacy === 'group') params.group_id = compose.group_id;
|
||||||
|
|
||||||
dispatch(createStatus(params, idempotencyKey, statusId)).then(function(data) {
|
dispatch(createStatus(params, idempotencyKey, statusId)).then(function(data) {
|
||||||
if (!statusId && data.visibility === 'direct' && getState().conversations.mounted <= 0 && routerHistory) {
|
if (!statusId && data.visibility === 'direct' && getState().conversations.mounted <= 0 && routerHistory) {
|
||||||
routerHistory.push('/messages');
|
routerHistory.push('/messages');
|
||||||
|
|
Loading…
Reference in New Issue