mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Stars subscriptions
This commit is contained in:
@@ -87,34 +87,35 @@ func chatHistoryEntriesForView(
|
||||
if (associatedData.subject?.isService ?? false) {
|
||||
|
||||
} else {
|
||||
if case let .peer(peerId) = location, case let cachedData = cachedData as? CachedChannelData, let invitedOn = cachedData?.invitedOn {
|
||||
joinMessage = Message(
|
||||
stableId: UInt32.max - 1000,
|
||||
stableVersion: 0,
|
||||
id: MessageId(peerId: peerId, namespace: Namespaces.Message.Local, id: 0),
|
||||
globallyUniqueId: nil,
|
||||
groupingKey: nil,
|
||||
groupInfo: nil,
|
||||
threadId: nil,
|
||||
timestamp: invitedOn,
|
||||
flags: [.Incoming],
|
||||
tags: [],
|
||||
globalTags: [],
|
||||
localTags: [],
|
||||
customTags: [],
|
||||
forwardInfo: nil,
|
||||
author: channelPeer,
|
||||
text: "",
|
||||
attributes: [],
|
||||
media: [TelegramMediaAction(action: .joinedByRequest)],
|
||||
peers: SimpleDictionary<PeerId, Peer>(),
|
||||
associatedMessages: SimpleDictionary<MessageId, Message>(),
|
||||
associatedMessageIds: [],
|
||||
associatedMedia: [:],
|
||||
associatedThreadInfo: nil,
|
||||
associatedStories: [:]
|
||||
)
|
||||
} else if let peer = channelPeer as? TelegramChannel, case .broadcast = peer.info, case .member = peer.participationStatus, !peer.flags.contains(.isCreator) {
|
||||
// if case let .peer(peerId) = location, case let cachedData = cachedData as? CachedChannelData, let invitedOn = cachedData?.invitedOn {
|
||||
// joinMessage = Message(
|
||||
// stableId: UInt32.max - 1000,
|
||||
// stableVersion: 0,
|
||||
// id: MessageId(peerId: peerId, namespace: Namespaces.Message.Local, id: 0),
|
||||
// globallyUniqueId: nil,
|
||||
// groupingKey: nil,
|
||||
// groupInfo: nil,
|
||||
// threadId: nil,
|
||||
// timestamp: invitedOn,
|
||||
// flags: [.Incoming],
|
||||
// tags: [],
|
||||
// globalTags: [],
|
||||
// localTags: [],
|
||||
// customTags: [],
|
||||
// forwardInfo: nil,
|
||||
// author: channelPeer,
|
||||
// text: "",
|
||||
// attributes: [],
|
||||
// media: [TelegramMediaAction(action: .joinedByRequest)],
|
||||
// peers: SimpleDictionary<PeerId, Peer>(),
|
||||
// associatedMessages: SimpleDictionary<MessageId, Message>(),
|
||||
// associatedMessageIds: [],
|
||||
// associatedMedia: [:],
|
||||
// associatedThreadInfo: nil,
|
||||
// associatedStories: [:]
|
||||
// )
|
||||
// } else
|
||||
if let peer = channelPeer as? TelegramChannel, case .broadcast = peer.info, case .member = peer.participationStatus, !peer.flags.contains(.isCreator) {
|
||||
joinMessage = Message(
|
||||
stableId: UInt32.max - 1000,
|
||||
stableVersion: 0,
|
||||
|
||||
Reference in New Issue
Block a user