Skip to content
Snippets Groups Projects
Commit c4a6b634 authored by Bruno Muniz's avatar Bruno Muniz :apple:
Browse files

Trying to debug issue w/ strangers on group

parent 0e26c3cf
No related branches found
No related tags found
2 merge requests!40v1.1.2b166,!38Using new database structure
...@@ -46,16 +46,16 @@ extension Session { ...@@ -46,16 +46,16 @@ extension Session {
func processGroupCreation(_ group: Group, memberIds: [Data], welcome: String?) -> GroupInfo { func processGroupCreation(_ group: Group, memberIds: [Data], welcome: String?) -> GroupInfo {
/// Save the group /// Save the group
/// ///
_ = try? dbManager.saveGroup(group) _ = try! dbManager.saveGroup(group)
/// Save the members /// Save the members
/// ///
memberIds.forEach { _ = try? dbManager.saveGroupMember(.init(groupId: group.id, contactId: $0)) } memberIds.forEach { _ = try! dbManager.saveGroupMember(.init(groupId: group.id, contactId: $0)) }
/// Save the welcome message (if any) /// Save the welcome message (if any)
/// ///
if let welcome = welcome { if let welcome = welcome {
_ = try? dbManager.saveMessage(.init( _ = try! dbManager.saveMessage(.init(
networkId: nil, networkId: nil,
senderId: group.leaderId, senderId: group.leaderId,
recipientId: nil, recipientId: nil,
...@@ -79,11 +79,8 @@ extension Session { ...@@ -79,11 +79,8 @@ extension Session {
scanStrangers {} scanStrangers {}
guard let info = try? dbManager.fetchGroupInfos(.init(groupId: group.id)).first else { let info = try! dbManager.fetchGroupInfos(.init(groupId: group.id)).first
fatalError() return info!
}
return info
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment