core: Actually define maximum nick/message lengths

This commit is contained in:
John Brooks 2016-12-27 17:56:35 -07:00
rodič 7dbac1cdf7
revize 48a869cb57
1 změnil soubory, kde provedl 6 přidání a 0 odebrání

Zobrazit soubor

@ -5,6 +5,12 @@ import (
"unicode/utf8"
)
const (
// Consistent with protocol's ContactRequestChannel
MaxMessageLength = 2000
MaxNicknameLength = 30
)
// IsNicknameAcceptable returns true for strings that are usable as contact nicknames.
// A nickname is acceptable if it:
// - Is composed of only valid UTF-8 sequences