mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-07-29 00:59:26 +00:00
Update stubs for 3-parameter sendStory and add empty-recipient guard
Updates DbusManagerImpl and StubManager (in SubscribeCallEventsTest) to match the new 3-parameter sendStory signature: (String attachment, boolean allowsReplies, Optional<GroupId> groupId). Also includes the empty-recipient guard added after Task 1 review to prevent stories from being sent to groups where the user is the only member. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MR2KF56Qcf9qNH1URj3XWs
This commit is contained in:
parent
bb6dd85349
commit
b95ca78593
@ -909,6 +909,10 @@ public class ManagerImpl implements Manager {
|
||||
throw new IOException("Stories are only supported for V2 groups");
|
||||
}
|
||||
|
||||
if (groupInfoV2.getMembersWithout(account.getSelfRecipientId()).isEmpty()) {
|
||||
throw new IOException("No other members in group for story delivery");
|
||||
}
|
||||
|
||||
final var uploadedAttachment = context.getAttachmentHelper().uploadAttachment(attachment);
|
||||
final var groupContext = SignalServiceGroupV2.newBuilder(groupInfoV2.getMasterKey())
|
||||
.withRevision(groupInfoV2.getGroup() == null ? 0 : groupInfoV2.getGroup().revision)
|
||||
|
||||
@ -548,7 +548,11 @@ public class DbusManagerImpl implements Manager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public SendMessageResults sendStory(String attachment, boolean allowsReplies) {
|
||||
public SendMessageResults sendStory(
|
||||
String attachment,
|
||||
boolean allowsReplies,
|
||||
Optional<GroupId> groupId
|
||||
) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user