Skip to content

First cut at sendStoryMessge issue #1592#1713

Open
scottslewis wants to merge 6 commits intoAsamK:masterfrom
scottslewis:master
Open

First cut at sendStoryMessge issue #1592#1713
scottslewis wants to merge 6 commits intoAsamK:masterfrom
scottslewis:master

Conversation

@scottslewis
Copy link

For issue #1592

With the above changes running in jsonrpc mode, if this is pasted into console:

{"jsonrpc":"2.0","method":"send","params":{"attachment":"C:\Users\slewi\Desktop\slewis.PNG","story":true,"group-id":"JTJ9xDBSHH3UNI2wSGfC8iBHNC/gyJfzAoh4R5ge2ow=","message":"MyMESSAGE1"},"id":17}

where there is a slewis.PNG image file, note new property "story":true, and group-id is an existing group of my creation with one other receiver in the group. The server responds:

{"jsonrpc":"2.0","result":{"results":[{"recipientAddress":{"uuid":"f483a783-d1e3-4c30-9373-8d22530b5353","number":"+19712072518"},"groupId":"JTJ9xDBSHH3UNI2wSGfC8iBHNC/gyJfzAoh4R5ge2ow=","type":"SUCCESS"}],"timestamp":1739838735451},"id":17}

But nothing gets through to any of the clients (i.e. the message/image does not appear for either member of the group, nor does it appear in other clients of mine as a posted story message.

If, however, I post this (no "story":true):

{"jsonrpc":"2.0","method":"send","params":{"attachment":"C:\Users\slewi\Desktop\slewis.PNG","group-id":"JTJ9xDBSHH3UNI2wSGfC8iBHNC/gyJfzAoh4R5ge2ow=","message":"MyMESSAGE1"},"id":16}
{"jsonrpc":"2.0","result":{"results":[{"recipientAddress":{"uuid":"f483a783-d1e3-4c30-9373-8d22530b5353","number":"+19712072518"},"groupId":"JTJ9xDBSHH3UNI2wSGfC8iBHNC/gyJfzAoh4R5ge2ow=","type":"SUCCESS"}],"timestamp":1739839925436},"id":16}

The following is retruned in response

{"jsonrpc":"2.0","method":"receive","params":{"envelope":{"source":"+19712072518","sourceNumber":"+19712072518","sourceUuid":"f483a783-d1e3-4c30-9373-8d22530b5353","sourceName":"Karen","sourceDevice":2,"timestamp":1739839987168,"serverReceivedTimestamp":1739839987271,"serverDeliveredTimestamp":1739839987272,"receiptMessage":{"when":1739839987168,"isDelivery":true,"isRead":false,"isViewed":false,"timestamps":[1739839925436]}},"account":"+15037568719"}}
{"jsonrpc":"2.0","method":"receive","params":{"envelope":{"source":"+19712072518","sourceNumber":"+19712072518","sourceUuid":"f483a783-d1e3-4c30-9373-8d22530b5353","sourceName":"Karen","sourceDevice":1,"timestamp":1739839987427,"serverReceivedTimestamp":1739839987439,"serverDeliveredTimestamp":1739839987440,"receiptMessage":{"when":1739839987427,"isDelivery":true,"isRead":false,"isViewed":false,"timestamps":[1739839925436]}},"account":"+15037568719"}}

And both the image and the message get through just fine...using the existing sendGroupMessage

In debugging, one thing that looks a little suspect is that on SendHelper.java:711 is thsi code:

   final GroupSendEndorsements groupSendEndorsements = null;//TODO

And the null groupSendEndorsements is subsequently used in the org.whispersystems.signalservice.api.SignalServiceMessageSender.sendGroupStory(DistributionId, Optional<byte[]>, List, List, GroupSendEndorsements, boolean, SignalServiceStoryMessage, long, Set, PartialSendBatchCompleteListener)

Which ends up calling

org.whispersystems.signalservice.api.SignalServiceMessageSender.sendGroupMessage(DistributionId, List, List, GroupSendEndorsements, long, Content, ContentHint, Optional<byte[]>, boolean, SenderKeyGroupEvents, boolean, boolean)

which has this line 2524 in SignalServiceMessageSender

SealedSenderAccess sealedSenderAccess = SealedSenderAccess.forGroupSend(groupSendEndorsements, unidentifiedAccess, story);

and groupSendEndorsements is null. Perhaps groupSendEndorsements needs to be non-null for the server to accept it?

Thanksinadvance for any help debugging this. Unfortunately, I do not know the Android Client or Desktop Client code well enough (nor have a dev environment for it yet to debug)...or I might be able to trace through the sending of a story through those UIs, to look at what arguments are passed into

org.whispersystems.signalservice.api.SignalServiceMessageSender.sendGroupStory(DistributionId, Optional<byte[]>, List, List, GroupSendEndorsements, boolean, SignalServiceStoryMessage, long, Set, PartialSendBatchCompleteListener)

@scottslewis
Copy link
Author

@AsamK

I've been trying to figure out how to get a hold of the GroupSendEndorsements needed for calling SealedSenderAccess.forGroupSend as described in above.

There is this code in GroupHelper class

`private GroupChange handleGroupChangeResponse(
final GroupInfoV2 groupInfoV2,
final GroupChangeResponse groupChangeResponse
) {
ReceivedGroupSendEndorsements groupSendEndorsements = dependencies.getGroupsV2Operations()
.forGroup(GroupSecretParams.deriveFromMasterKey(groupInfoV2.getMasterKey()))
.receiveGroupSendEndorsements(account.getAci(),
groupInfoV2.getGroup(),
groupChangeResponse.groupSendEndorsementsResponse);

    // TODO save group endorsements

    return groupChangeResponse.groupChange;
}

`

The TODO implies to me that the group endorsements needed to send a story message for the group have to be stored on the client....or accessed in some other way at story message send time. Is that right? Could you please let me know if there is some other code that shows how to save/store as per your TODO...or just access at send story time the group send endorsements?

Thanks.

@AsamK
Copy link
Owner

AsamK commented Apr 5, 2025

Indeed group endorsements are still on my todo list, as I don't know yet what they are exactly.
They will have to be saved in the database somehow, probably similar to how the Android app does it.
But I will need some spare time to investigate how this works in Signal-Android.

@r1sk01
Copy link

r1sk01 commented Jun 9, 2025

i was taking a look at my issue and saw this
ill take a look as well into group endorsements and report any findings here
(part of me is wishing that signal would just provide an api for bots, but we know that probably wont be happening any time soon ;-;)

@scottslewis
Copy link
Author

Ping @AsamK and @r1sk01. I would like to get this going and now have a little opportunity to do so...but still need some help with group endorsements.

@r1sk01
Copy link

r1sk01 commented Jan 28, 2026

Ping @AsamK and @r1sk01. I would like to get this going and now have a little opportunity to do so...but still need some help with group endorsements.

On phone at the minute.
What parts are currently implemented? Is group endorsements the last thing to do?

@scottslewis
Copy link
Author

scottslewis commented Jan 28, 2026 via email

@r1sk01
Copy link

r1sk01 commented Jan 28, 2026

So...this pr has an impl of sengroupmessage...but testing showed it didnt
work...as there in no way to get or send in group msg an appropriate group
endorsement...at least that appears to be the problem since server just
ignores message.

Its been six months + since this was produced though so it needs to be
rebased.

I was hoping that someone familiar with the other clents could find how
group endorsements are gotten or created at send time.

On Tue, Jan 27, 2026, 9:02 PM Aria Arctic @.***> wrote:

r1sk01 left a comment (#1713)
#1713 (comment)

Ping @AsamK https://github.com/AsamK and @r1sk01
https://github.com/r1sk01. I would like to get this going and now have
a little opportunity to do so...but still need some help with group
endorsements.

On phone at the minute.
What parts are currently implemented? Is group endorsements the last thing
to do?


Reply to this email directly, view it on GitHub
#1713 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABHB5B6BEELXGAPWZ6ETG34JA7GRAVCNFSM6AAAAACTDZ7FJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQMBYHE3TANBQGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

That is a really interesting issue.
I actually am unsure if other clients have implemented stories yet, which makes this a little more difficult.
When I'm on a computer, I'll take a look and see what I can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants