core: Actually define maximum nick/message lengths
This commit is contained in:
parent
7dbac1cdf7
commit
48a869cb57
|
@ -5,6 +5,12 @@ import (
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Consistent with protocol's ContactRequestChannel
|
||||||
|
MaxMessageLength = 2000
|
||||||
|
MaxNicknameLength = 30
|
||||||
|
)
|
||||||
|
|
||||||
// IsNicknameAcceptable returns true for strings that are usable as contact nicknames.
|
// IsNicknameAcceptable returns true for strings that are usable as contact nicknames.
|
||||||
// A nickname is acceptable if it:
|
// A nickname is acceptable if it:
|
||||||
// - Is composed of only valid UTF-8 sequences
|
// - Is composed of only valid UTF-8 sequences
|
||||||
|
|
Loading…
Reference in New Issue