Wire up stored account badges to the profile endpoints

This commit is contained in:
Ehren Kret
2021-09-03 15:49:27 -05:00
parent bc887ec6fa
commit fc1465c05d
5 changed files with 64 additions and 26 deletions

View File

@@ -0,0 +1,22 @@
/*
* Copyright 2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.badges;
import java.util.Set;
import javax.ws.rs.core.Request;
import org.whispersystems.textsecuregcm.entities.Badge;
import org.whispersystems.textsecuregcm.storage.AccountBadge;
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.
*/
Set<Badge> convert(Request request, Set<AccountBadge> accountBadges);
}