owpengram-server/internal/rpc/messages_constants.go

58 lines
2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package rpc
import (
"telesrv/internal/domain"
"time"
)
const (
maxSendMessageTextLength = domain.MaxMessageTextLength
maxReplyQuoteLength = domain.MaxMessageReplyQuoteLength
maxMessageSearchQLength = 256
maxMessageEntityCount = domain.MaxMessageEntityCount
maxGetMessagesIDs = 100
maxMessageSearchFilters = 32
maxForumTopicIDs = 100
maxDialogInputPeers = 100
maxSearchResultsLimit = 100
maxReactionVector = 16
maxReactionListOffset = 128
maxReportOptionLength = 32
maxReportCommentLength = 1024
maxReportRandomIDLength = 128
maxReadMetrics = 100
maxBusinessConnIDLength = 128
maxSendMultiMediaItems = 10
maxScheduledMessagePage = 100
maxForumTopicTitleLength = 128
maxPollVoteOptions = 10
maxPollOptionBytes = 256
maxPollVotesOffsetLength = 128
maxTodoItems = 30
maxTodoTitleLength = 200
// maxTodoItemID 是清单项 id 的防御上限:协议只要求列表内唯一正整数(客户端通常
// 顺序分配),不能用条目数上限当 id 边界,否则非顺序分配的合法 id 被误拒。
maxTodoItemID = 1 << 16
maxVenueTitleLength = 256
maxVenueAddressLength = 512
maxVenueProviderLength = 64
maxVenueIDLength = 256
// live location 有效期边界(官方 60s..1d0x7FFFFFFF = 手动停止前一直共享)。
minLiveLocationPeriod = 60
maxLiveLocationPeriod = 86400
foreverLiveLocationPeriod = 0x7FFFFFFF
maxLiveLocationHeading = 360
maxProximityRadiusMeters = 100000
// maxGeoAccuracyRadiusMeters 与 proximity radius 同量级上限;越界静默归零(按未知精度处理)。
maxGeoAccuracyRadiusMeters = 100000
maxCommonChatsLimit = domain.MaxCommonChannelsLimit
maxStickerSearchQLength = 128
maxStickerSearchLangs = 16
maxEmojiLangCodeLength = 32
maxEmojiDocuments = 100
maxSavedReactionTagTitle = 12
defaultTopReactionsLimit = 14
sendMessageRateWindow = time.Minute
forumGeneralTopicID = 1
forumGeneralIconColor = 0x6FB9F0
)