Commit 8b5178ba authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Allow longer device IDs in link ops

parent 33a7c6a2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p
- Allow group batch fetch by both ID and name.
- Increase heartbeat server time precision.
- Rework the embedded dashboard.
- Allow up to 64 characters for device ID linking.

### Fixed
- Fix Facebook unlink operation.
+2 −2
Original line number Diff line number Diff line
@@ -54,8 +54,8 @@ func (p *pipeline) linkDevice(logger zap.Logger, session *session, envelope *Env
	} else if invalidCharsRegex.MatchString(deviceID) {
		session.Send(ErrorMessageBadInput(envelope.CollationId, "Invalid device ID, no spaces or control characters allowed"))
		return
	} else if len(deviceID) < 10 || len(deviceID) > 36 {
		session.Send(ErrorMessageBadInput(envelope.CollationId, "Invalid device ID, must be 10-36 bytes"))
	} else if len(deviceID) < 10 || len(deviceID) > 64 {
		session.Send(ErrorMessageBadInput(envelope.CollationId, "Invalid device ID, must be 10-64 bytes"))
		return
	}