Various improvements

This commit is contained in:
Ilya Laktyushin
2022-10-15 21:08:11 +03:00
parent da4934dc97
commit 59b593696e
54 changed files with 379 additions and 236 deletions

View File

@@ -68,6 +68,7 @@ public enum AdminLogEventAction {
case toggleCopyProtection(Bool)
case sendMessage(Message)
case changeAvailableReactions(previousValue: PeerAllowedReactions, updatedValue: PeerAllowedReactions)
case changeUsernames(prev: [String], new: [String])
}
public enum ChannelAdminLogEventError {
@@ -265,6 +266,8 @@ func channelAdminLogEvents(postbox: Postbox, network: Network, peerId: PeerId, m
}
case let .channelAdminLogEventActionChangeAvailableReactions(prevValue, newValue):
action = .changeAvailableReactions(previousValue: PeerAllowedReactions(apiReactions: prevValue), updatedValue: PeerAllowedReactions(apiReactions: newValue))
case let .channelAdminLogEventActionChangeUsernames(prevValue, newValue):
action = .changeUsernames(prev: prevValue, new: newValue)
}
let peerId = PeerId(namespace: Namespaces.Peer.CloudUser, id: PeerId.Id._internalFromInt64Value(userId))
if let action = action {