Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the group "id" to the group message receive payload #571

Open
i-software opened this issue Aug 5, 2024 · 0 comments
Open

Add the group "id" to the group message receive payload #571

i-software opened this issue Aug 5, 2024 · 0 comments

Comments

@i-software
Copy link

Hello,

I'm using the latest docker image bbernhard/signal-cli-rest-api:latest which is version 0.13.4

I asking to add the other group "id" key of the group in the payload of a group receive message.
Now the group receive message returns the payload like this:

{
"payload": [
{
"envelope": {
"source": "+5999XXXXXXX",
"sourceNumber": "+5999XXXXXX",
"sourceUuid": "b73a0708-xxxx-xxxx-xxxx-f7f432d7bf6c",
"sourceName": "xxxxxxxx",
"sourceDevice": 1,
"timestamp": 1722868115744,
"dataMessage": {
"timestamp": 1722868115744,
"message": "Hello",
"expiresInSeconds": 0,
"viewOnce": false,
"groupInfo": {
"groupId": "mHN1kiXgMXpKz5Ah2l110NLQHzIrYaFuC3c3mzpSoaE=",
"type": "DELIVER"
}
}
},
"account": "+5999YYYYYYY"
}
],
"topic": "",
"_msgid": "80a6aca226901dd4",
"statusCode": 200,
"headers": {
"content-type": "text/plain; charset=utf-8",
"date": "Mon, 05 Aug 2024 14:28:44 GMT",
"content-length": "395",
"x-node-red-request-node": "0712abeb"
},
"responseUrl": "http://10.0.0.20:9080/v1/receive/+5999YYYYYYY?timeout=1",
"redirectList": [],
"retry": 0
}

That "groupId" is the internal_id that you will get, when you run:

curl -X GET -H "Content-Type: application/json" 'http://10.0.0.20:9080/v1/groups/+5999YYYYYYY'

[
{
"name": "ToyTron",
"id": "group.bUhOMWtpWGdNWHBLejVBaDJsMTEwTkxRSHpJcllhRnVDM2MzbXpwU29hRT0=",
"internal_id": "mHN1kiXgMXpKz5Ah2l110NLQHzIrYaFuC3c3mzpSoaE=",
"members": [
"+5999YYYYYYY",
"",
"+5999XXXXXXX"
],
"blocked": false,
"pending_invites": [],
"pending_requests": [],
"invite_link": "",
"admins": [
"+5999YYYYYYY",
"",
"+5999XXXXXXX"
]
}
]

"internal_id":"mHN1kiXgMXpKz5Ah2l110NLQHzIrYaFuC3c3mzpSoaE="

What I like to have is the "id" also in the payload of the group receive message:
"id":"group.bUhOMWtpWGdNWHBLejVBaDJsMTEwTkxRSHpJcllhRnVDM2MzbXpwU29hRT0="

So it will be like this:
.......
"groupInfo": {
"groupId": "mHN1kiXgMXpKz5Ah2l110NLQHzIrYaFuC3c3mzpSoaE=",
"id": "group.bUhOMWtpWGdNWHBLejVBaDJsMTEwTkxRSHpJcllhRnVDM2MzbXpwU29hRT0=",
"type": "DELIVER"
}
.......

Then I can use this "id" to send a message to this group.

I hope that I had explain what I need.

73
Reginald de Windt

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

No branches or pull requests

1 participant