polyphony-chat / chorus

A Rust library for interacting with multiple Polyphony- and Spacebar-Compatible instances at once.
https://crates.io/crates/chorus
Mozilla Public License 2.0
16 stars 7 forks source link

Make instance GatewayOptions configurable for library consumers #555

Closed bitfl0wer closed 2 weeks ago

bitfl0wer commented 2 weeks ago

zlib Gateway compression was introduced on the dev branch not too long ago. Library consumers do not yet have a straightforward option for selecting the newly added GatewayOptions, which describe the wanted set of encoding and compression capabilities for interacting with the Gateway of an instance. This PR modifies functions which yield a new Instance object by adding a options field, which allows to supply custom GatewayOptions if wanted, defaulting to GatewayOptions::default() if none are supplied.