···3import {msg} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
56-import {useAgent} from '#/state/session'
7import {TimeElapsed} from '#/view/com/util/TimeElapsed'
8import {atoms as a, useTheme} from '#/alf'
9import {Text} from '#/components/Typography'
···17 next: TempDmChatDefs.MessageView | TempDmChatDefs.DeletedMessage | null
18}) {
19 const t = useTheme()
20- const {getAgent} = useAgent()
2122- const isFromSelf = item.sender?.did === getAgent().session?.did
2324 const isNextFromSelf =
25 TempDmChatDefs.isMessageView(next) &&
26- next.sender?.did === getAgent().session?.did
2728 const isLastInGroup = useMemo(() => {
29 // if the next message is from a different sender, then it's the last in the group
···3import {msg} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
56+import {useSession} from '#/state/session'
7import {TimeElapsed} from '#/view/com/util/TimeElapsed'
8import {atoms as a, useTheme} from '#/alf'
9import {Text} from '#/components/Typography'
···17 next: TempDmChatDefs.MessageView | TempDmChatDefs.DeletedMessage | null
18}) {
19 const t = useTheme()
20+ const {currentAccount} = useSession()
2122+ const isFromSelf = item.sender?.did === currentAccount?.did
2324 const isNextFromSelf =
25 TempDmChatDefs.isMessageView(next) &&
26+ next.sender?.did === currentAccount?.did
2728 const isLastInGroup = useMemo(() => {
29 // if the next message is from a different sender, then it's the last in the group