about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/reducers/accounts.js
diff options
context:
space:
mode:
authorbeatrix <beatrix.bitrot@gmail.com>2018-05-06 11:32:05 -0400
committerGitHub <noreply@github.com>2018-05-06 11:32:05 -0400
commit35a1a3171fdf7f9f4e7a6c3086e12e68f336f64b (patch)
tree5ccb9de241bf26b8e214abe6c231ec07ac2b6f92 /app/javascript/flavours/glitch/reducers/accounts.js
parentaf4fb72993982bdc27a32a438502d493428cdce9 (diff)
parent356d0214c93da79f0583a62a6ca748828d721326 (diff)
Merge pull request #449 from ThibG/glitch-soc/features/upstream-account-items
Support upstream bio items / custom account fields
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/accounts.js')
-rw-r--r--app/javascript/flavours/glitch/reducers/accounts.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/reducers/accounts.js b/app/javascript/flavours/glitch/reducers/accounts.js
index 61354f2e1..23fbd999c 100644
--- a/app/javascript/flavours/glitch/reducers/accounts.js
+++ b/app/javascript/flavours/glitch/reducers/accounts.js
@@ -69,6 +69,14 @@ const normalizeAccount = (state, account) => {
   account.display_name_html = emojify(escapeTextContentForBrowser(displayName));
   account.note_emojified = emojify(account.note);
 
+  if (account.fields) {
+    account.fields = account.fields.map(pair => ({
+      ...pair,
+      name_emojified: emojify(escapeTextContentForBrowser(pair.name)),
+      value_emojified: emojify(pair.value),
+    }));
+  }
+
   if (account.moved) {
     state = normalizeAccount(state, account.moved);
     account.moved = account.moved.id;