mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-05-19 13:24:16 +00:00
Merge branch 'master' into openapi-docs
This commit is contained in:
commit
b6b8276fd6
@ -1,5 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.14.0] - 2026-03-01
|
||||
|
||||
**Attention**: Now requires Java 25
|
||||
|
||||
@ -8,7 +8,7 @@ plugins {
|
||||
|
||||
allprojects {
|
||||
group = "org.asamk"
|
||||
version = "0.14.0"
|
||||
version = "0.14.1-SNAPSHOT"
|
||||
}
|
||||
|
||||
java {
|
||||
|
||||
@ -442,6 +442,7 @@ By default, recipients can select multiple options.
|
||||
|
||||
*-o* OPTION [OPTION ...], *--option* OPTION [OPTION ...]*::
|
||||
The options for the poll.
|
||||
Between 2 and 10 options must be specified.
|
||||
|
||||
=== sendPollVote
|
||||
|
||||
|
||||
@ -144,6 +144,7 @@ public class ListContactsCommand implements JsonRpcLocalCommand {
|
||||
contact.nickNameFamilyName(),
|
||||
contact.note(),
|
||||
contact.color(),
|
||||
contact.isArchived(),
|
||||
contact.isBlocked(),
|
||||
contact.isHidden(),
|
||||
contact.messageExpirationTime(),
|
||||
|
||||
@ -24,6 +24,7 @@ import static org.asamk.signal.util.SendMessageResultUtils.outputResult;
|
||||
public class SendPollCreateCommand implements JsonRpcLocalCommand {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SendPollCreateCommand.class);
|
||||
private static final int MAX_POLL_OPTIONS = 10;
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
@ -72,6 +73,9 @@ public class SendPollCreateCommand implements JsonRpcLocalCommand {
|
||||
if (options.size() < 2) {
|
||||
throw new UserErrorException("Poll needs at least two options");
|
||||
}
|
||||
if (options.size() > MAX_POLL_OPTIONS) {
|
||||
throw new UserErrorException("Poll cannot have more than " + MAX_POLL_OPTIONS + " options");
|
||||
}
|
||||
|
||||
try {
|
||||
var results = m.sendPollCreateMessage(question, !noMulti, options, recipientIdentifiers, notifySelf);
|
||||
|
||||
@ -20,6 +20,7 @@ public record JsonContact(
|
||||
@JsonProperty(required = true) String nickFamilyName,
|
||||
@JsonProperty(required = true) String note,
|
||||
@JsonProperty(required = true) String color,
|
||||
@JsonProperty(required = true) boolean isArchived,
|
||||
@JsonProperty(required = true) boolean isBlocked,
|
||||
@JsonProperty(required = true) boolean isHidden,
|
||||
@JsonProperty(required = true) int messageExpirationTime,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user