Fixed wrong exclude_reply_user_ids for updating status
This commit is contained in:
parent
41caa9f9ee
commit
94560df05f
|
@ -55,9 +55,9 @@ public class StatusUpdate extends SimpleValueMap {
|
||||||
|
|
||||||
public StatusUpdate excludeReplyUserIds(@Nullable final String[] ids) {
|
public StatusUpdate excludeReplyUserIds(@Nullable final String[] ids) {
|
||||||
if (ids == null) {
|
if (ids == null) {
|
||||||
remove("exclude_reply_userids");
|
remove("exclude_reply_user_ids");
|
||||||
} else {
|
} else {
|
||||||
put("exclude_reply_userids", RestFuUtils.toString(ids, ','));
|
put("exclude_reply_user_ids", RestFuUtils.toString(ids, ','));
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,8 +36,8 @@ android {
|
||||||
applicationId "org.mariotaku.twidere"
|
applicationId "org.mariotaku.twidere"
|
||||||
minSdkVersion project.properties['overrideMinSdkVersion'] ?: 14
|
minSdkVersion project.properties['overrideMinSdkVersion'] ?: 14
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 326
|
versionCode 327
|
||||||
versionName '3.5.9'
|
versionName '3.5.10'
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("true")'
|
buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("true")'
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.mariotaku.twidere.model.UserKey;
|
||||||
import org.mariotaku.twidere.model.account.cred.Credentials;
|
import org.mariotaku.twidere.model.account.cred.Credentials;
|
||||||
import org.mariotaku.twidere.model.util.AccountUtils;
|
import org.mariotaku.twidere.model.util.AccountUtils;
|
||||||
import org.mariotaku.twidere.util.api.TwitterAndroidExtraHeaders;
|
import org.mariotaku.twidere.util.api.TwitterAndroidExtraHeaders;
|
||||||
|
import org.mariotaku.twidere.util.api.TwitterMacExtraHeaders;
|
||||||
import org.mariotaku.twidere.util.api.UserAgentExtraHeaders;
|
import org.mariotaku.twidere.util.api.UserAgentExtraHeaders;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -176,7 +177,7 @@ public class MicroBlogAPIFactory implements TwidereConstants {
|
||||||
return new UserAgentExtraHeaders("Twitter/6.75.2 CFNetwork/811.4.18 Darwin/16.5.0");
|
return new UserAgentExtraHeaders("Twitter/6.75.2 CFNetwork/811.4.18 Darwin/16.5.0");
|
||||||
}
|
}
|
||||||
case TWITTER_FOR_MAC: {
|
case TWITTER_FOR_MAC: {
|
||||||
return new UserAgentExtraHeaders("Twitter-Mac/5002734 Mac/10.12.3 (;x86_64)");
|
return TwitterMacExtraHeaders.INSTANCE;
|
||||||
}
|
}
|
||||||
case TWEETDECK: {
|
case TWEETDECK: {
|
||||||
return new UserAgentExtraHeaders(UserAgentUtils.getDefaultUserAgentStringSafe(context));
|
return new UserAgentExtraHeaders(UserAgentUtils.getDefaultUserAgentStringSafe(context));
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
/*
|
||||||
|
* Twidere - Twitter client for Android
|
||||||
|
*
|
||||||
|
* Copyright (C) 2012-2017 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.mariotaku.twidere.util.api
|
||||||
|
|
||||||
|
import android.os.Build
|
||||||
|
import org.mariotaku.ktextension.bcp47Tag
|
||||||
|
import org.mariotaku.twidere.util.MicroBlogAPIFactory.ExtraHeaders
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by mariotaku on 2017/2/25.
|
||||||
|
*/
|
||||||
|
object TwitterMacExtraHeaders : ExtraHeaders {
|
||||||
|
|
||||||
|
const val clientName = "Twitter-Mac"
|
||||||
|
const val versionName = "6.41.0"
|
||||||
|
const val platformName = "Mac"
|
||||||
|
const val platformVersion = "10.12.3"
|
||||||
|
const val platformArchitecture = "x86_64"
|
||||||
|
const val internalVersionName = "5002734"
|
||||||
|
|
||||||
|
override fun get(): List<Pair<String, String>> {
|
||||||
|
val result = ArrayList<Pair<String, String>>()
|
||||||
|
val language = Locale.getDefault().bcp47Tag
|
||||||
|
result.add(Pair("User-Agent", userAgent))
|
||||||
|
result.add(Pair("Accept-Language", language))
|
||||||
|
result.add(Pair("X-Twitter-Client", clientName))
|
||||||
|
result.add(Pair("X-Twitter-Client-Version", versionName))
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
val userAgent: String get() {
|
||||||
|
val model = Build.MODEL
|
||||||
|
val manufacturer = Build.MANUFACTURER
|
||||||
|
val sdkRelease = Build.VERSION.RELEASE
|
||||||
|
val brand = Build.BRAND
|
||||||
|
val product = Build.PRODUCT
|
||||||
|
return "$clientName/($internalVersionName) $platformName/$platformVersion (;$platformArchitecture)"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue