mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-07 23:38:40 +01:00
parent
dda112b0ca
commit
fd55e70e6a
@ -32,12 +32,6 @@ class CreateFriendshipTask(context: Context) : AbsFriendshipOperationTask(contex
|
|||||||
}
|
}
|
||||||
AccountType.MASTODON -> {
|
AccountType.MASTODON -> {
|
||||||
val mastodon = details.newMicroBlogInstance(context, Mastodon::class.java)
|
val mastodon = details.newMicroBlogInstance(context, Mastodon::class.java)
|
||||||
if (details.key.host != args.userKey.host) {
|
|
||||||
if (args.screenName == null)
|
|
||||||
throw MicroBlogException("Screen name required to follow remote user")
|
|
||||||
return mastodon.followRemoteUser("${args.screenName}@${args.userKey.host}")
|
|
||||||
.toParcelable(details)
|
|
||||||
}
|
|
||||||
mastodon.followUser(args.userKey.id)
|
mastodon.followUser(args.userKey.id)
|
||||||
return mastodon.getAccount(args.userKey.id).toParcelable(details)
|
return mastodon.getAccount(args.userKey.id).toParcelable(details)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user