Skip to content

Commit 0bb9fb4

Browse files
AnkaAnka
authored andcommitted
Update Package.swift and Sources for v0.17.0
1 parent e85242e commit 0bb9fb4

File tree

4 files changed

+419
-286
lines changed

4 files changed

+419
-286
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ let package = Package(
1919
targets: [
2020
.binaryTarget(
2121
name: "ProseCore",
22-
url: "https://github.com/prose-im/prose-wrapper-swift/releases/download/v0.16.0/ProseSDK-0.16.0.zip",
23-
checksum: "24532a6c70543625e646311b9a4d0212bfdf39f42f3aee1260efeb3229bee9da"
22+
url: "https://github.com/prose-im/prose-wrapper-swift/releases/download/v0.17.0/ProseSDK-0.17.0.zip",
23+
checksum: "a801774f51b9f77bba91e3cdd3522b5e929685117e53bbb91f6102ad1c0320fb"
2424
),
2525
.target(
2626
name: "ProseSDK",

Sources/ProseSDK/MucId.swift

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import Foundation
2+
3+
public struct MucId:
4+
Codable,
5+
Hashable,
6+
Sendable,
7+
RawRepresentable,
8+
CustomStringConvertible,
9+
CustomDebugStringConvertible
10+
{
11+
public let rawValue: String
12+
13+
public init?(rawValue: String) {
14+
guard isValidMucId(mucId: rawValue) else {
15+
return nil
16+
}
17+
self.rawValue = rawValue
18+
}
19+
20+
public init?(_ value: String) {
21+
self.init(rawValue: value)
22+
}
23+
24+
internal init(unsafe value: String) {
25+
self.rawValue = value
26+
}
27+
28+
public var debugDescription: String {
29+
self.rawValue
30+
}
31+
32+
public var description: String {
33+
self.rawValue
34+
}
35+
}

Sources/ProseSDK/UserId.swift

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import Foundation
2+
3+
public struct UserId:
4+
Codable,
5+
Hashable,
6+
Sendable,
7+
RawRepresentable,
8+
CustomStringConvertible,
9+
CustomDebugStringConvertible
10+
{
11+
public let rawValue: String
12+
13+
public init?(rawValue: String) {
14+
guard isValidUserId(userId: rawValue) else {
15+
return nil
16+
}
17+
self.rawValue = rawValue
18+
}
19+
20+
public init?(_ value: String) {
21+
self.init(rawValue: value)
22+
}
23+
24+
internal init(unsafe value: String) {
25+
self.rawValue = value
26+
}
27+
28+
public var debugDescription: String {
29+
self.rawValue
30+
}
31+
32+
public var description: String {
33+
self.rawValue
34+
}
35+
}

0 commit comments

Comments
 (0)