Peer sound and message removal update

This commit is contained in:
Ali
2022-03-30 01:22:44 +04:00
parent 0e55dd7db7
commit 235302c7c4
63 changed files with 3906 additions and 1934 deletions

View File

@@ -684,6 +684,25 @@ public extension TelegramEngine {
public func updatePeerAllowedReactions(peerId: PeerId, allowedReactions: [String]) -> Signal<Never, UpdatePeerAllowedReactionsError> {
return _internal_updatePeerAllowedReactions(account: account, peerId: peerId, allowedReactions: allowedReactions)
}
public func notificationSoundList() -> Signal<NotificationSoundList?, NoError> {
let key = PostboxViewKey.cachedItem(_internal_cachedNotificationSoundListCacheKey())
return self.account.postbox.combinedView(keys: [key])
|> map { views -> NotificationSoundList? in
guard let view = views.views[key] as? CachedItemView else {
return nil
}
return view.value?.get(NotificationSoundList.self)
}
}
public func saveNotificationSound(file: TelegramMediaFile) -> Signal<Never, UploadNotificationSoundError> {
return _internal_saveNotificationSound(account: self.account, file: file)
}
public func uploadNotificationSound(title: String, data: Data) -> Signal<NotificationSoundList.NotificationSound, UploadNotificationSoundError> {
return _internal_uploadNotificationSound(account: self.account, title: title, data: data)
}
}
}