Story caption and reply text length limit

This commit is contained in:
Ilya Laktyushin
2023-07-04 14:24:15 +02:00
parent 14c595b53f
commit 16c66c7bad
10 changed files with 291 additions and 81 deletions

View File

@@ -51,6 +51,7 @@ public enum EngineConfiguration {
public let maxReactionsPerMessage: Int32
public let maxSharedFolderInviteLinks: Int32
public let maxSharedFolderJoin: Int32
public let maxStoryCaptionLength: Int32
public static var defaultValue: UserLimits {
return UserLimits(UserLimitsConfiguration.defaultValue)
@@ -71,7 +72,8 @@ public enum EngineConfiguration {
maxAnimatedEmojisInText: Int32,
maxReactionsPerMessage: Int32,
maxSharedFolderInviteLinks: Int32,
maxSharedFolderJoin: Int32
maxSharedFolderJoin: Int32,
maxStoryCaptionLength: Int32
) {
self.maxPinnedChatCount = maxPinnedChatCount
self.maxArchivedPinnedChatCount = maxArchivedPinnedChatCount
@@ -88,6 +90,7 @@ public enum EngineConfiguration {
self.maxReactionsPerMessage = maxReactionsPerMessage
self.maxSharedFolderInviteLinks = maxSharedFolderInviteLinks
self.maxSharedFolderJoin = maxSharedFolderJoin
self.maxStoryCaptionLength = maxStoryCaptionLength
}
}
}
@@ -139,7 +142,8 @@ public extension EngineConfiguration.UserLimits {
maxAnimatedEmojisInText: userLimitsConfiguration.maxAnimatedEmojisInText,
maxReactionsPerMessage: userLimitsConfiguration.maxReactionsPerMessage,
maxSharedFolderInviteLinks: userLimitsConfiguration.maxSharedFolderInviteLinks,
maxSharedFolderJoin: userLimitsConfiguration.maxSharedFolderJoin
maxSharedFolderJoin: userLimitsConfiguration.maxSharedFolderJoin,
maxStoryCaptionLength: userLimitsConfiguration.maxStoryCaptionLength
)
}
}