mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Add warning if user has no profile name set
This commit is contained in:
parent
35679216f7
commit
656282459c
1 changed files with 5 additions and 0 deletions
|
@ -517,6 +517,11 @@ class ManagerImpl implements Manager {
|
||||||
public SendMessageResults sendMessage(
|
public SendMessageResults sendMessage(
|
||||||
Message message, Set<RecipientIdentifier> recipients
|
Message message, Set<RecipientIdentifier> recipients
|
||||||
) throws IOException, AttachmentInvalidException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException, UnregisteredRecipientException, InvalidStickerException {
|
) throws IOException, AttachmentInvalidException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException, UnregisteredRecipientException, InvalidStickerException {
|
||||||
|
final var selfProfile = context.getProfileHelper().getSelfProfile();
|
||||||
|
if (selfProfile == null || selfProfile.getDisplayName().isEmpty()) {
|
||||||
|
logger.warn(
|
||||||
|
"No profile name set. When sending a message it's recommended to set a profile name wit the updateProfile command. This may become mandatory in the future.");
|
||||||
|
}
|
||||||
final var messageBuilder = SignalServiceDataMessage.newBuilder();
|
final var messageBuilder = SignalServiceDataMessage.newBuilder();
|
||||||
applyMessage(messageBuilder, message);
|
applyMessage(messageBuilder, message);
|
||||||
return sendMessage(messageBuilder, recipients);
|
return sendMessage(messageBuilder, recipients);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue