diff --git a/submodules/Postbox/Sources/MessageHistoryTable.swift b/submodules/Postbox/Sources/MessageHistoryTable.swift index 98bc01ebc1..d34be5344c 100644 --- a/submodules/Postbox/Sources/MessageHistoryTable.swift +++ b/submodules/Postbox/Sources/MessageHistoryTable.swift @@ -20,11 +20,11 @@ private enum AdjacentEntryGroupInfo { private func getAdjacentEntryGroupInfo(_ entry: IntermediateMessageHistoryEntry?, key: Int64) -> (IntermediateMessageHistoryEntry?, AdjacentEntryGroupInfo) { if let entry = entry { - if let groupingKey = entry.message.groupingKey { + if let groupingKey = entry.message.groupingKey, let groupInfo = entry.message.groupInfo { if groupingKey == key { - return (entry, .sameGroup(entry.message.groupInfo!)) + return (entry, .sameGroup(groupInfo)) } else { - return (entry, .otherGroup(entry.message.groupInfo!)) + return (entry, .otherGroup(groupInfo)) } } else { return (entry, .none)