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 support for latest signald client protocol #11

Closed
fancypantalons opened this issue Jun 29, 2020 · 9 comments
Closed

Add support for latest signald client protocol #11

fancypantalons opened this issue Jun 29, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@fancypantalons
Copy link

The move to the latest Signal client library in signald MR 14 introduces client protocol changes that will require an update to libpurple-signald.

This update will address a number of issues in signald and has the potential to enable additional features.

The MR is ready for client test integration.

@fancypantalons
Copy link
Author

BTW, I'm happy to take a run at this, but I'd want to build on the refactored codebase that's part of issue #8, which is not yet merged in.

@hoehermann
Copy link
Owner

hoehermann commented Jun 30, 2020

@fancypantalons I don't want to be the show-stopper here. I skimmed your additions and merged with master. :)

Update: Noticed a memory-leak and fixed the PurpleMessageFlags issue. Could not keep my hands off the repetitive includes. They are still backwards, but now there is less of them. :D Please rebase.

@fancypantalons
Copy link
Author

Alright, I've pushed 10ad8ba

After banging my head against a mysterious group chat issue that I have a strong feeling was a multi-hour PEBKAC, I ran through a bunch of basic smoke tests and things seem to be working. This includes:

  • Startup, contacts lists download, group chat initialization -- all look good
  • Basic DM (to myself)
  • Basic group message (to some of my friends whom I victimized with spam in the wee hours of the morning)
  • Image receipt (from my own mobile client to Pidgin)
  • Image send (from Pidgin to my mobile client)
  • Basic group join and leave.

I've not tested group updates to invite, but given I don't believe there was any changes in that area, I don't expect a regression.

I had some issues with linking but I suspect Signal was rate limiting me after a few failed linking attempts and I didn't realize it until I started doing protocol dumps. It's probably worth someone else validating this to see if it was spurious on my end.

@hoehermann
Copy link
Owner

Nice work on the testing. What version of signald do I need? It seems the protocol changes are not backwards compatible. This is breaking stuff for the currently supplied 0.9.0+git2020-06-30 over at my system.

@fancypantalons
Copy link
Author

Clone the repo and check out the automated-upgrade/com.github.turasa-signal-service-java branch.

@fancypantalons
Copy link
Author

Incidentally, given how relatively minor these changes are, I'm tempted to look into just supporting both the old and new protocols. I expect I could build a couple utility functions for pulling and populating addresses, whether it's the old format or the new JsonObject layout, and the other small changes could be done by just conditionalizing the code in place.

I might be slightly ugly, but it'd make the upgrade path obviously much simpler and would allow us to get the code in while Finn is still sorting out the remaining details on the MR (which is a monster changeset...)

@fancypantalons
Copy link
Author

Alright, FYI, I've pushed 96e101c to the branch. This commit adds parallel support for both the old and new signald protocols.

It's a bit hacky (basically relies on sending a get_user message and then tests for an error being returned), but I've tested it with the current released version and the development branch and it seems to work.

@hoehermann
Copy link
Owner

Thank you. Works fine for me (with the old signald protocol still active). Looking forward to the signald update. :)

@hoehermann
Copy link
Owner

Implemented with 96e101c.

@hoehermann hoehermann added the enhancement New feature or request label Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants