aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-02-14 10:51:09 +0300
committerGravatar Vitaly Takmazov2024-02-18 18:08:07 +0300
commitc9c500a07d58fbbbe8bfd1cbc326140872ccc785 (patch)
treef3a8428ca88093b484eb74beab4b91a17b6f6a1d /vnext/src/ui
parentfa1de59ff559e8537956786f1a70d6b67cbbfd86 (diff)
Fetch ActivityPub profiles
Diffstat (limited to 'vnext/src/ui')
-rw-r--r--vnext/src/ui/UserInfo.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/vnext/src/ui/UserInfo.js b/vnext/src/ui/UserInfo.js
index f71dfcdc..3ea78d6f 100644
--- a/vnext/src/ui/UserInfo.js
+++ b/vnext/src/ui/UserInfo.js
@@ -97,12 +97,7 @@ export function UserLink(props) {
if (userRef.current.uri) {
fetchUserUri(userRef.current.uri).then(remote_user => {
if (isMounted) {
- setUser({
- uid: 0,
- uname: remote_user.preferredUsername,
- avatar: remote_user.icon && remote_user.icon.url,
- uri: userRef.current.uri
- })
+ setUser(remote_user)
}
}).catch(() => {
setUser({
@@ -122,7 +117,7 @@ export function UserLink(props) {
<Link key={user.uid} to={`/${user.uname}/`} className="info-avatar">
<img src={user.avatar} />{user.uname}
</Link>
- : <a href={user.uri} className="info-avatar">
+ : <a href={user.url || user.uri} className="info-avatar">
<img src={user.avatar || defaultAvatar} />{user.uname}
</a>
)