diff options
Diffstat (limited to 'app/javascript/flavours/glitch/utils/privacy_preference.js')
-rw-r--r-- | app/javascript/flavours/glitch/utils/privacy_preference.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/utils/privacy_preference.js b/app/javascript/flavours/glitch/utils/privacy_preference.js new file mode 100644 index 000000000..7781ca7fa --- /dev/null +++ b/app/javascript/flavours/glitch/utils/privacy_preference.js @@ -0,0 +1,5 @@ +export const order = ['public', 'unlisted', 'private', 'direct']; + +export function privacyPreference (a, b) { + return order[Math.max(order.indexOf(a), order.indexOf(b), 0)]; +}; |