mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2025-12-19 15:44:28 +01:00
made qrcode version configureable via query parameter (e.g
?qrcode_version=11) see #402
This commit is contained in:
@@ -935,7 +935,7 @@ func (s *SignalClient) DeleteGroup(number string, groupId string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *SignalClient) GetQrCodeLink(deviceName string) ([]byte, error) {
|
||||
func (s *SignalClient) GetQrCodeLink(deviceName string, qrCodeVersion int) ([]byte, error) {
|
||||
if s.signalCliMode == JsonRpc {
|
||||
return []byte{}, errors.New(endpointNotSupportedInJsonRpcMode)
|
||||
}
|
||||
@@ -946,7 +946,7 @@ func (s *SignalClient) GetQrCodeLink(deviceName string) ([]byte, error) {
|
||||
return []byte{}, errors.New("Couldn't create QR code: " + err.Error())
|
||||
}
|
||||
|
||||
q, err := qrcode.NewWithForcedVersion(string(tsdeviceLink), 10, qrcode.Highest)
|
||||
q, err := qrcode.NewWithForcedVersion(string(tsdeviceLink), qrCodeVersion, qrcode.Highest)
|
||||
if err != nil {
|
||||
return []byte{}, errors.New("Couldn't create QR code: " + err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user