upgrade with latest MASTODON API

#1291 Thanks @Linkid
This commit is contained in:
Suji Yan 2020-05-02 00:28:49 +08:00 committed by GitHub
parent dda112b0ca
commit fd55e70e6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -32,12 +32,6 @@ class CreateFriendshipTask(context: Context) : AbsFriendshipOperationTask(contex
}
AccountType.MASTODON -> {
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)
return mastodon.getAccount(args.userKey.id).toParcelable(details)
}