Skip to content

Commit

Permalink
Fix build problem
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Pex committed Oct 2, 2017
1 parent 4c6bc7b commit b563d8d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ import SignalProtocolObjC

fileprivate func fetchUsername(_ yapKey:String, yapCollection:String, transaction:YapDatabaseReadTransaction) -> String? {
if let object = transaction.object(forKey: yapKey, inCollection: yapCollection) {
if object is OTRAccount {
return (object as AnyObject).username
} else if object is OTRBuddy {
return (object as AnyObject).username
if let account = object as? OTRAccount {
return account.username
} else if let buddy = object as? OTRBuddy {
return buddy.username
}
}
return nil
Expand Down

0 comments on commit b563d8d

Please sign in to comment.