Skip to content

Commit 2a8994c

Browse files
committed
アクティビティで該当のメッセージに直接飛ぶように
1 parent 4c3688d commit 2a8994c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/Main/NavigationBar/NavigationContent/ActivityElement.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import MessagePanel from '/@/components/UI/MessagePanel/MessagePanel.vue'
1313
import { computed } from 'vue'
1414
import type { ActivityTimelineMessage } from '@traptitech/traq'
1515
import useChannelPath from '/@/composables/useChannelPath'
16+
import { constructMessagesPath } from '/@/router'
1617
1718
const props = defineProps<{
1819
type: 'channel' | 'message'
@@ -24,5 +25,9 @@ const { channelIdToLink } = useChannelPath()
2425
const titleType = computed(() =>
2526
props.type === 'channel' ? 'channel' : 'user'
2627
)
27-
const channelLink = computed(() => channelIdToLink(props.message.channelId))
28+
const channelLink = computed(() =>
29+
props.type === 'channel'
30+
? channelIdToLink(props.message.channelId)
31+
: constructMessagesPath(props.message.id)
32+
)
2833
</script>

0 commit comments

Comments
 (0)