Send acceptable languages instead of request into the profile badge converter

This commit is contained in:
Ehren Kret
2021-09-08 18:17:27 -05:00
parent 81a21c0d5f
commit bd40e32f3b
4 changed files with 17 additions and 14 deletions

View File

@@ -5,8 +5,9 @@
package org.whispersystems.textsecuregcm.badges;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import javax.ws.rs.core.Request;
import org.whispersystems.textsecuregcm.entities.Badge;
import org.whispersystems.textsecuregcm.storage.AccountBadge;
@@ -14,9 +15,7 @@ public interface ProfileBadgeConverter {
/**
* Converts the {@link AccountBadge}s for an account into the objects
* that can be returned on a profile fetch. This requires returning
* localized strings given the user's locale which will be retrieved from
* the {@link Request} object passed in.
* that can be returned on a profile fetch.
*/
Set<Badge> convert(Request request, Set<AccountBadge> accountBadges);
Set<Badge> convert(List<Locale> acceptableLanguages, Set<AccountBadge> accountBadges);
}