Fix some server-side limits not being respected in web UI (#39163)
This commit is contained in:
1 parent
0275a97888
commit
f6d1795da5
4 files changed
+4
-4
No files matched your search
@@ -9,7 +9,7 @@ const mapStateToProps = state => {
|
||||
const readyAttachmentsSize = state.getIn(['compose', 'media_attachments']).size ?? 0;
|
||||
const pendingAttachmentsSize = state.getIn(['compose', 'pending_media_attachments']).size ?? 0;
|
||||
const attachmentsSize = readyAttachmentsSize + pendingAttachmentsSize;
|
||||
const isOverLimit = attachmentsSize > state.getIn(['server', 'server', 'configuration', 'statuses', 'max_media_attachments'])-1;
|
||||
const isOverLimit = attachmentsSize > state.getIn(['server', 'server', 'item', 'configuration', 'statuses', 'max_media_attachments'])-1;
|
||||
const hasVideoOrAudio = state.getIn(['compose', 'media_attachments']).some(m => ['video', 'audio'].includes(m.get('type')));
|
||||
const hasQuote = !!state.compose.get('quoted_status_id');
|
||||
|
||||
|
||||
Reference in new issue
Block a user