mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 01:18:20 +01:00
Wire up stored account badges to the profile endpoints
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user