mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-25 01:22:41 +00:00
no message
This commit is contained in:
parent
02269ab60e
commit
edd14a8f41
@ -204,6 +204,7 @@ private var declaredEncodables: Void = {
|
||||
declareEncodable(GlobalNotificationSettings.self, f: { GlobalNotificationSettings(decoder: $0) })
|
||||
declareEncodable(CloudChatRemoveChatOperation.self, f: { CloudChatRemoveChatOperation(decoder: $0) })
|
||||
declareEncodable(SynchronizePinnedChatsOperation.self, f: { SynchronizePinnedChatsOperation(decoder: $0) })
|
||||
declareEncodable(SynchronizeConsumeMessageContentsOperation.self, f: { SynchronizeConsumeMessageContentsOperation(decoder: $0) })
|
||||
declareEncodable(RecentMediaItem.self, f: { RecentMediaItem(decoder: $0) })
|
||||
declareEncodable(RecentPeerItem.self, f: { RecentPeerItem(decoder: $0) })
|
||||
declareEncodable(LoggedOutAccountAttribute.self, f: { LoggedOutAccountAttribute(decoder: $0) })
|
||||
@ -529,6 +530,8 @@ public class Account {
|
||||
self.managedOperationsDisposable.add(managedRecentGifs(postbox: self.postbox, network: self.network).start())
|
||||
self.managedOperationsDisposable.add(managedRecentlyUsedInlineBots(postbox: self.postbox, network: self.network).start())
|
||||
self.managedOperationsDisposable.add(managedLocalTypingActivities(activities: self.localInputActivityManager.allActivities(), postbox: self.postbox, network: self.network).start())
|
||||
self.managedOperationsDisposable.add(managedSynchronizeConsumeMessageContentOperations(postbox: self.postbox, network: self.network, stateManager : self.stateManager).start())
|
||||
|
||||
|
||||
let updatedPresence = self.shouldKeepOnlinePresence.get()
|
||||
|> distinctUntilChanged
|
||||
|
||||
@ -189,7 +189,14 @@ func enqueueMessages(modifier: Modifier, account: Account, peerId: PeerId, messa
|
||||
}
|
||||
}
|
||||
|
||||
storeMessages.append(StoreMessage(peerId: peerId, namespace: Namespaces.Message.Local, globallyUniqueId: randomId, timestamp: timestamp, flags: flags, tags: tagsForStoreMessage(media: mediaList, textEntities: entitiesAttribute?.entities), forwardInfo: nil, authorId: account.peerId, text: text, attributes: attributes, media: mediaList))
|
||||
let authorId:PeerId?
|
||||
if let peer = peer as? TelegramChannel, case let .broadcast(info) = peer.info, !info.flags.contains(.messagesShouldHaveSignatures) {
|
||||
authorId = nil
|
||||
} else {
|
||||
authorId = account.peerId
|
||||
}
|
||||
|
||||
storeMessages.append(StoreMessage(peerId: peerId, namespace: Namespaces.Message.Local, globallyUniqueId: randomId, timestamp: timestamp, flags: flags, tags: tagsForStoreMessage(media: mediaList, textEntities: entitiesAttribute?.entities), forwardInfo: nil, authorId: authorId, text: text, attributes: attributes, media: mediaList))
|
||||
case let .forward(source):
|
||||
if let sourceMessage = modifier.getMessage(source), let author = sourceMessage.author {
|
||||
if let peer = peer as? TelegramSecretChat {
|
||||
|
||||
@ -345,10 +345,11 @@ extension StoreMessage {
|
||||
}
|
||||
}
|
||||
|
||||
if let file = media as? TelegramMediaFile {
|
||||
for case let file as TelegramMediaFile in medias {
|
||||
if peerId.namespace == Namespaces.Peer.CloudUser || peerId.namespace == Namespaces.Peer.CloudGroup {
|
||||
if file.isVoice {
|
||||
attributes.append(ConsumableContentMessageAttribute(consumed: (flags & (1 << 5)) != 0))
|
||||
attributes.append(ConsumableContentMessageAttribute(consumed: (flags & (1 << 5)) == 0))
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user