mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 12:46:53 +00:00
Add tests for ProvisioningController
This commit is contained in:
1 parent
4fc3949367
commit
0f17d63774
3 files changed
+121
-11
No files matched your search
+1
-1
@@ -48,7 +48,7 @@ public class ProvisioningController {
|
||||
rateLimiters.getMessagesLimiter().validate(auth.getAccount().getUuid());
|
||||
|
||||
if (!provisioningManager.sendProvisioningMessage(new ProvisioningAddress(destinationName, 0),
|
||||
Base64.getMimeDecoder().decode(message.getBody()))) {
|
||||
Base64.getMimeDecoder().decode(message.body()))) {
|
||||
throw new WebApplicationException(Response.Status.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-10
@@ -5,16 +5,7 @@
|
||||
|
||||
package org.whispersystems.textsecuregcm.entities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
public class ProvisioningMessage {
|
||||
|
||||
@JsonProperty
|
||||
@NotEmpty
|
||||
private String body;
|
||||
|
||||
public String getBody() {
|
||||
return body;
|
||||
}
|
||||
public record ProvisioningMessage(@NotEmpty String body) {
|
||||
}
|
||||
Reference in new issue
Block a user