about summary refs log tree commit diff
path: root/app/javascript/flavours
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-15 13:34:05 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-15 14:12:24 -0500
commitcf3ec71aa564c7fe47ec79f8dd5f14e3bce0b85c (patch)
tree49a3356c4177157b377aeca223a7d1c1e2e3dc17 /app/javascript/flavours
parent0a5eba734e6aa6a6e7e8f64b022af8ea129c9f5d (diff)
local visibility scope, chat scope+tags, unlisted tags
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r--app/javascript/flavours/glitch/reducers/compose.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js
index 43876e450..8747d51f5 100644
--- a/app/javascript/flavours/glitch/reducers/compose.js
+++ b/app/javascript/flavours/glitch/reducers/compose.js
@@ -116,6 +116,10 @@ function statusToTextMentions(state, status) {
     set = set.add(`@${status.getIn(['account', 'acct'])} `);
   }
 
+  set = set.union(status.get('tags').filter(
+    tag => tag.get('name') && tag.get('name').startsWith("chat.")
+  ).map(tag => `#${tag.get('name')} `));
+
   return set.union(status.get('mentions').filterNot(mention => mention.get('id') === me).map(mention => `@${mention.get('acct')} `)).join('');
 };
 
@@ -126,6 +130,10 @@ function apiStatusToTextMentions (state, status) {
     set = set.add(`@${status.account.acct} `);
   }
 
+  set = set.union(status.tags.filter(
+    tag => tag.name && tag.name.startsWith("chat.")
+  ).map(tag => `#${tag.name} `));
+
   return set.union(status.mentions.filter(
     mention => mention.id !== me
   ).map(