mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 03:48:05 +01:00
Set avatar to null on Account when request is false (#78)
This commit is contained in:
@@ -2,6 +2,7 @@ package org.whispersystems.textsecuregcm.controllers;
|
||||
|
||||
import com.amazonaws.services.s3.AmazonS3;
|
||||
import com.codahale.metrics.annotation.Timed;
|
||||
import io.dropwizard.auth.Auth;
|
||||
import org.apache.commons.codec.DecoderException;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
@@ -51,8 +52,6 @@ import java.time.ZonedDateTime;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
import io.dropwizard.auth.Auth;
|
||||
|
||||
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
|
||||
@Path("/v1/profile")
|
||||
public class ProfileController {
|
||||
@@ -125,7 +124,7 @@ public class ProfileController {
|
||||
}
|
||||
|
||||
account.setProfileName(request.getName());
|
||||
if (avatar != null) account.setAvatar(avatar);
|
||||
account.setAvatar(avatar);
|
||||
accountsManager.update(account);
|
||||
|
||||
if (response.isPresent()) return Response.ok(response).build();
|
||||
|
||||
Reference in New Issue
Block a user