mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
dbead5e3c8
Added a few types to make the code more readable Added the inbox request to the polling Added a couple of properties to the TSContactThread to indicate the originating open group to support SOGS DMs Added code to store the latest message id for an open group inbox Added a bunch of documentation from the API docs into the OpenGroupAPI (and associated models) Updated the OpenGroupAPI to match the latest docs Fixed the incorrect structure of the SendDirectMessageRequest Fixed an incorrect inbox endpoint path Tweaked the batch response handling so it wouldn't fail to parse all responses if a single one failed Renamed IdPrefix to SessionId.Prefix and cleaned up the type to be more readable & self-documenting
18 lines
500 B
Swift
18 lines
500 B
Swift
|
|
public extension String {
|
|
|
|
func removingIdPrefixIfNeeded() -> String {
|
|
var result = self
|
|
if result.count == 66 && SessionId.Prefix(from: result) != nil { result.removeFirst(2) }
|
|
return result
|
|
}
|
|
}
|
|
|
|
@objc public extension NSString {
|
|
|
|
@objc func removingIdPrefixIfNeeded() -> NSString {
|
|
var result = self as String
|
|
if result.count == 66 && SessionId.Prefix(from: result) != nil { result.removeFirst(2) }
|
|
return result as NSString
|
|
}
|
|
}
|