Update API

This commit is contained in:
Ilya Laktyushin
2022-12-05 17:05:40 +04:00
parent 9c1c901a97
commit 1103706315
50 changed files with 200 additions and 99 deletions

View File

@@ -86,6 +86,7 @@ public enum AdminLogEventAction {
case editTopic(prevInfo: ForumTopicInfo, newInfo: ForumTopicInfo)
case pinTopic(prevInfo: EngineMessageHistoryThread.Info?, newInfo: EngineMessageHistoryThread.Info?)
case toggleForum(isForum: Bool)
case toggleAntiSpam(isEnabled: Bool)
}
public enum ChannelAdminLogEventError {
@@ -342,6 +343,8 @@ func channelAdminLogEvents(postbox: Postbox, network: Network, peerId: PeerId, m
action = .pinTopic(prevInfo: prevInfo, newInfo: newInfo)
case let .channelAdminLogEventActionToggleForum(newValue):
action = .toggleForum(isForum: newValue == .boolTrue)
case let .channelAdminLogEventActionToggleAntiSpam(newValue):
action = .toggleAntiSpam(isEnabled: newValue == .boolTrue)
}
let peerId = PeerId(namespace: Namespaces.Peer.CloudUser, id: PeerId.Id._internalFromInt64Value(userId))
if let action = action {