Selaa lähdekoodia

Test if server supports note

Tusooa Zhu 2 vuotta sitten
vanhempi
sitoutus
9ab3f27f72

+ 3 - 0
src/components/user_card/user_card.js

@@ -130,6 +130,9 @@ export default {
       const privileges = this.loggedIn.privileges
       return this.loggedIn.role === 'admin' || privileges.includes('users_manage_activation_state') || privileges.includes('users_delete') || privileges.includes('users_manage_tags')
     },
+    supportsNote () {
+      return 'note' in this.relationship
+    },
     ...mapGetters(['mergedConfig'])
   },
   components: {

+ 1 - 1
src/components/user_card/user_card.vue

@@ -269,7 +269,7 @@
           <RemoteFollow :user="user" />
         </div>
         <UserNote
-          v-if="loggedIn && isOtherUser"
+          v-if="loggedIn && isOtherUser && supportsNote"
           :user="user"
           :relationship="relationship"
           :editing="isEditingNote"