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

[feature request] Add ability to receive and log contact and group updates that occur during receive #1676

Open
brad2014 opened this issue Jan 14, 2025 · 0 comments

Comments

@brad2014
Copy link

When a "signal-cli receive" command is run, it may get a syncMessage that causes updated contact or group information to be retrieved from the server. The syncMessage is logged, but the "effect" of the storage update is not.

This feature request is to implement a way to include this infromation in the output stream of the receive command.
The use case is for signal-cli receive to log changes, say, for an audit log of storage (including profile) updates.

Idea: Implement a receive flag (e.g. signal-cli receive --json --include-storage-fetch --changes-only ) that retrieves the update, emits messages that log the profile fields that are changed. It would compare with the existing storage and only emit the fields that changed (without the --changes-only flag, all fields would be included). The emitted fields would have the same structure as the json output of listGroups and listContacts.

For example, if a fetch causes a note field to change, signal-cli receive --json --include-storage-fetch --changes-only might emit:

{ "contactUpdates": {
  "previousFetchTimestamp": 1736434100000, // the before state
  "currentFetchTimestamp": 1736434500000, // the after state
  "changesOnly": true,
  "contacts": [{
    "uuid": "3ed69681-a82d-4b44-960d-544ca924c868",
    "note": "I updated my private note for John!",
    "profile": {
      "lastUpdateTimestamp": 1736434200000,
      "about": "My name is John, and this is my updated status!",
    }, ... ]
  }
}
{ "groupUpdates":  {
  "previousFetchTimestamp": 1736434000000,
  "currentFetchTimestamp": 1736434500000,
  "changesOnly": true,
  "changes": [{
      "id": "X6QAur89gaRTgTH+0VA51jm3P9DTNzoBILM7Ji0gguE=",",
      "isBlocked": true
    }, ... ]
  }
}

This feature request is a followup to bug #1664. This would also resolve, I think, related feature requests like #826 and #1219.

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