mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Peer sound and message removal update
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user