whisperfish / libsignal-service-rs

A Rust version of the libsignal-service-java library for communicating with Signal servers.
https://whisperfish.github.io/libsignal-service-rs/libsignal_service
GNU Affero General Public License v3.0
69 stars 32 forks source link

Allow PNI in PendingMember #329

Closed rubdos closed 1 month ago

rubdos commented 1 month ago

Should fix #328

The other member decryption functions are ACI-only (which makes sense). I double-checked this.

@gferon, @boxdot, I have removed Serialize and Deserialize bounds on some structs. These were in place because Presage stores those structs directly in its database, but I don't think that is correct behavior. libsignal-service exposes those structs without any forward or backward compatibility guarantees, as illustrated in here: the uuid field is dropped in favor of the service_id field. Migration should be handled by the storage backend. Same reasoning goes for #324.

rubdos commented 1 month ago

Adding some more convenience methods and refactoring to this, while I'm implementing the changes in WF.

gferon commented 1 month ago

exposes those structs without any forward or backward compatibility guarantees

I just realized that while this statement is true, it's not really a big deal for data that's transient or can be re-fetched when invalidated (which is the case for groups).

rubdos commented 1 month ago

I just realized that while this statement is true, it's not really a big deal for data that's transient or can be re-fetched when invalidated (which is the case for groups).

Sure, but a big point of Signal is to rely as little as possible on state stored on the server. I don't think a "low-level" library like lss should facilitate that kind of "unorthodox behavior".