Deprecate legacy method

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-07-07 19:45:46 +02:00
parent 835cac8189
commit f2fe776603
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B

View File

@ -182,6 +182,15 @@ public class ApiUtils {
throw new NoSupportedApiException();
}
/**
* migrate to {@link #getChatApiVersion(User, int[])}.
*
* @param user User
* @param versions API versions
* @return to be used verison
* @throws NoSupportedApiException if no supported version available
*/
@Deprecated
public static int getChatApiVersion(UserEntity user, int[] versions) throws NoSupportedApiException {
for (int version : versions) {
if (version == APIv1 && CapabilitiesUtil.hasSpreedFeatureCapability(user, "chat-v2")) {