about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/public_timeline/index.js
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-09-02 11:57:06 +0200
committerGitHub <noreply@github.com>2022-09-02 11:57:06 +0200
commit2a46fcc3ed6b9c013c549d7bcd3f1827ec8c306c (patch)
tree0e4729d2b93ca14b4810c3816949bc4c6c915aab /app/javascript/flavours/glitch/features/public_timeline/index.js
parentd4e63cd980a87b7bdbde57124d230e7e60ec38f1 (diff)
Fix regexp filtering in pinned community/public TLs (#1840)
Diffstat (limited to 'app/javascript/flavours/glitch/features/public_timeline/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/public_timeline/index.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/public_timeline/index.js b/app/javascript/flavours/glitch/features/public_timeline/index.js
index 848049965..9f31cf922 100644
--- a/app/javascript/flavours/glitch/features/public_timeline/index.js
+++ b/app/javascript/flavours/glitch/features/public_timeline/index.js
@@ -21,6 +21,7 @@ const mapStateToProps = (state, { columnId }) => {
   const onlyMedia = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'onlyMedia']) : state.getIn(['settings', 'public', 'other', 'onlyMedia']);
   const onlyRemote = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'onlyRemote']) : state.getIn(['settings', 'public', 'other', 'onlyRemote']);
   const allowLocalOnly = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'allowLocalOnly']) : state.getIn(['settings', 'public', 'other', 'allowLocalOnly']);
+  const regex = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'regex', 'body']) : state.getIn(['settings', 'public', 'regex', 'body']);
   const timelineState = state.getIn(['timelines', `public${onlyMedia ? ':media' : ''}`]);
 
   return {
@@ -28,6 +29,7 @@ const mapStateToProps = (state, { columnId }) => {
     onlyMedia,
     onlyRemote,
     allowLocalOnly,
+    regex,
   };
 };
 
@@ -52,6 +54,7 @@ class PublicTimeline extends React.PureComponent {
     onlyMedia: PropTypes.bool,
     onlyRemote: PropTypes.bool,
     allowLocalOnly: PropTypes.bool,
+    regex: PropTypes.string,
   };
 
   handlePin = () => {
@@ -133,6 +136,7 @@ class PublicTimeline extends React.PureComponent {
           scrollKey={`public_timeline-${columnId}`}
           emptyMessage={<FormattedMessage id='empty_column.public' defaultMessage='There is nothing here! Write something publicly, or manually follow users from other servers to fill it up' />}
           bindToDocument={!multiColumn}
+          regex={this.props.regex}
         />
       </Column>
     );