aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat_title/chat_title.js
blob: f6e299ad33986d58ddf33fa3876f1de34b28475a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
import UserAvatar from '../user_avatar/user_avatar.vue'
import RichContent from 'src/components/rich_content/rich_content.jsx'

export default {
  name: 'ChatTitle',
  components: {
    UserAvatar,
    RichContent
  },
  props: [
    'user', 'withAvatar'
  ],
  computed: {
    title () {
      return this.user ? this.user.screen_name_ui : ''
    },
    htmlTitle () {
      return this.user ? this.user.name_html : ''
    }
  },
  methods: {
    getUserProfileLink (user) {
      return generateProfileLink(user.id, user.screen_name)
    }
  }
}