Merge branch 'master' into openapi-docs

This commit is contained in:
Era Dorta 2026-03-06 23:00:36 +01:00
commit b6b8276fd6
6 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,7 @@
# Changelog
## [Unreleased]
## [0.14.0] - 2026-03-01
**Attention**: Now requires Java 25

View File

@ -8,7 +8,7 @@ plugins {
allprojects {
group = "org.asamk"
version = "0.14.0"
version = "0.14.1-SNAPSHOT"
}
java {

View File

@ -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

View File

@ -144,6 +144,7 @@ public class ListContactsCommand implements JsonRpcLocalCommand {
contact.nickNameFamilyName(),
contact.note(),
contact.color(),
contact.isArchived(),
contact.isBlocked(),
contact.isHidden(),
contact.messageExpirationTime(),

View File

@ -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);

View File

@ -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,