Skip to content

Commit 3a5c175

Browse files
authoredJul 3, 2023
Improving Lemmy 0.18.0 support (#34)
1 parent a8c8ceb commit 3a5c175

36 files changed

+127
-122
lines changed
 

‎Sources/Lemmy-Swift-Client/Lemmy API/Enums/ListingType.swift

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ public enum ListingType: String, Codable, CustomStringConvertible, CaseIterable
44
case all = "All"
55
case local = "Local"
66
case subscribed = "Subscribed"
7-
case community = "Community"
87

98
public var description: String {
109
return rawValue

‎Sources/Lemmy-Swift-Client/Lemmy API/Enums/SortType.swift

+14-8
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,30 @@ public enum SortType: String, Codable, CustomStringConvertible, CaseIterable {
66
case active = "Active"
77
/// Posts sorted by a decaying rank.
88
case hot = "Hot"
9-
/// Posts sorted by the most comments.
10-
case mostComments = "MostComments"
119
/// Posts sorted by the published time.
1210
case new = "New"
13-
/// Posts sorted by the newest comments, with no necrobumping. IE a forum sort.
14-
case newComments = "NewComments"
1511
/// Posts sorted by the published time ascending
1612
case old = "Old"
17-
/// The top posts of all time.
18-
case topAll = "TopAll"
1913
/// The top posts for this last day.
2014
case topDay = "TopDay"
21-
/// The top posts for this last month.
22-
case topMonth = "TopMonth"
2315
/// The top posts for this last week.
2416
case topWeek = "TopWeek"
17+
/// The top posts for this last month.
18+
case topMonth = "TopMonth"
2519
/// The top posts for this last year.
2620
case topYear = "TopYear"
21+
/// The top posts of all time.
22+
case topAll = "TopAll"
23+
/// Posts sorted by the most comments.
24+
case mostComments = "MostComments"
25+
/// Posts sorted by the newest comments, with no necrobumping. IE a forum sort.
26+
case newComments = "NewComments"
27+
/// The top posts for this last hour.
28+
case topHour = "TopHour"
29+
/// The top posts for this last six hour.
30+
case topSixHour = "TopSixHour"
31+
/// The top posts for this last six hour.
32+
case topTwelveHour = "TopTwelveHour"
2733

2834
public var description: String {
2935
return rawValue

‎Sources/Lemmy-Swift-Client/Lemmy API/Requests/SaveUserSettings.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ public struct SaveUserSettingsRequest: APIRequest {
1111
public let banner: String?
1212
public let bio: String?
1313
public let bot_account: Bool?
14-
public let default_listing_type: Int?
15-
public let default_sort_type: Int?
14+
public let default_listing_type: ListingType?
15+
public let default_sort_type: SortType?
1616
public let discussion_languages: [Int]?
1717
public let display_name: String?
1818
public let email: String?
@@ -33,8 +33,8 @@ public struct SaveUserSettingsRequest: APIRequest {
3333
banner: String? = nil,
3434
bio: String? = nil,
3535
bot_account: Bool? = nil,
36-
default_listing_type: Int? = nil,
37-
default_sort_type: Int? = nil,
36+
default_listing_type: ListingType? = nil,
37+
default_sort_type: SortType? = nil,
3838
discussion_languages: [Int]? = nil,
3939
display_name: String? = nil,
4040
email: String? = nil,

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/AdminPurgeCommentView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import Foundation
22

33
public struct AdminPurgeCommentView: Codable {
4-
public let admin: PersonSafe?
4+
public let admin: Person?
55
public let admin_purge_comment: AdminPurgeComment
66
public let post: Post
77

8-
public init(admin: PersonSafe? = nil, admin_purge_comment: AdminPurgeComment, post: Post) {
8+
public init(admin: Person? = nil, admin_purge_comment: AdminPurgeComment, post: Post) {
99
self.admin = admin
1010
self.admin_purge_comment = admin_purge_comment
1111
self.post = post

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/AdminPurgeCommunityView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import Foundation
22

33
public struct AdminPurgeCommunityView: Codable {
4-
public let admin: PersonSafe?
4+
public let admin: Person?
55
public let admin_purge_community: AdminPurgeCommunity
66

7-
public init(admin: PersonSafe? = nil, admin_purge_community: AdminPurgeCommunity) {
7+
public init(admin: Person? = nil, admin_purge_community: AdminPurgeCommunity) {
88
self.admin = admin
99
self.admin_purge_community = admin_purge_community
1010
}

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/AdminPurgePersonView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import Foundation
22

33
public struct AdminPurgePersonView: Codable {
4-
public let admin: PersonSafe?
4+
public let admin: Person?
55
public let admin_purge_person: AdminPurgePerson
66

7-
public init(admin: PersonSafe? = nil, admin_purge_person: AdminPurgePerson) {
7+
public init(admin: Person? = nil, admin_purge_person: AdminPurgePerson) {
88
self.admin = admin
99
self.admin_purge_person = admin_purge_person
1010
}

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/AdminPurgePostView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import Foundation
22

33
public struct AdminPurgePostView: Codable {
4-
public let admin: PersonSafe?
4+
public let admin: Person?
55
public let admin_purge_post: AdminPurgePost
66
public let community: CommunitySafe
77

8-
public init(admin: PersonSafe? = nil, admin_purge_post: AdminPurgePost, community: CommunitySafe) {
8+
public init(admin: Person? = nil, admin_purge_post: AdminPurgePost, community: CommunitySafe) {
99
self.admin = admin
1010
self.admin_purge_post = admin_purge_post
1111
self.community = community

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/CommentReplyView.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ public struct CommentReplyView: Codable {
55
public let comment_reply: CommentReply
66
public let community: CommunitySafe
77
public let counts: CommentAggregates
8-
public let creator: PersonSafe
8+
public let creator: Person
99
public let creator_banned_from_community: Bool
1010
public let creator_blocked: Bool
1111
public let my_vote: Int?
1212
public let post: Post
13-
public let recipient: PersonSafe
13+
public let recipient: Person
1414
public let saved: Bool
1515
public let subscribed: SubscribedType
1616

@@ -19,12 +19,12 @@ public struct CommentReplyView: Codable {
1919
comment_reply: CommentReply,
2020
community: CommunitySafe,
2121
counts: CommentAggregates,
22-
creator: PersonSafe,
22+
creator: Person,
2323
creator_banned_from_community: Bool,
2424
creator_blocked: Bool,
2525
my_vote: Int? = nil,
2626
post: Post,
27-
recipient: PersonSafe,
27+
recipient: Person,
2828
saved: Bool,
2929
subscribed: SubscribedType
3030
) {

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/CommentReportView.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ import Foundation
22

33
public struct CommentReportView: Codable {
44
public let comment: Comment
5-
public let comment_creator: PersonSafe
5+
public let comment_creator: Person
66
public let comment_report: CommentReport
77
public let community: CommunitySafe
88
public let counts: CommentAggregates
9-
public let creator: PersonSafe
9+
public let creator: Person
1010
public let creator_banned_from_community: Bool
1111
public let my_vote: Int?
1212
public let post: Post
13-
public let resolver: PersonSafe?
13+
public let resolver: Person?
1414

1515
public init(
1616
comment: Comment,
17-
comment_creator: PersonSafe,
17+
comment_creator: Person,
1818
comment_report: CommentReport,
1919
community: CommunitySafe,
2020
counts: CommentAggregates,
21-
creator: PersonSafe,
21+
creator: Person,
2222
creator_banned_from_community: Bool,
2323
my_vote: Int? = nil,
2424
post: Post,
25-
resolver: PersonSafe? = nil
25+
resolver: Person? = nil
2626
) {
2727
self.comment = comment
2828
self.comment_creator = comment_creator

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/CommentView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public struct CommentView: Codable {
44
public let comment: Comment
55
public let community: CommunitySafe
66
public let counts: CommentAggregates
7-
public let creator: PersonSafe
7+
public let creator: Person
88
public let creator_banned_from_community: Bool
99
public let creator_blocked: Bool
1010
public let my_vote: Int?
@@ -16,7 +16,7 @@ public struct CommentView: Codable {
1616
comment: Comment,
1717
community: CommunitySafe,
1818
counts: CommentAggregates,
19-
creator: PersonSafe,
19+
creator: Person,
2020
creator_banned_from_community: Bool,
2121
creator_blocked: Bool,
2222
my_vote: Int? = nil,

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/CommunityBlockView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import Foundation
22

33
public struct CommunityBlockView: Codable {
44
public let community: CommunitySafe
5-
public let person: PersonSafe
5+
public let person: Person
66

7-
public init(community: CommunitySafe, person: PersonSafe) {
7+
public init(community: CommunitySafe, person: Person) {
88
self.community = community
99
self.person = person
1010
}

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/CommunityFolowerView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import Foundation
22

33
public struct CommunityFolowerView: Codable {
44
public let community: CommunitySafe
5-
public let follower: PersonSafe
5+
public let follower: Person
66

7-
public init(community: CommunitySafe, follower: PersonSafe) {
7+
public init(community: CommunitySafe, follower: Person) {
88
self.community = community
99
self.follower = follower
1010
}

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/CommunityModeratorView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import Foundation
22

33
public struct CommunityModeratorView: Codable {
44
public let community: CommunitySafe
5-
public let moderator: PersonSafe
5+
public let moderator: Person
66

7-
public init(community: CommunitySafe, moderator: PersonSafe) {
7+
public init(community: CommunitySafe, moderator: Person) {
88
self.community = community
99
self.moderator = moderator
1010
}

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/LocalUserSettings.swift ‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/LocalUser.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import Foundation
22

3-
public struct LocalUserSettings: Codable {
3+
public struct LocalUser: Codable {
44
public let accepted_application: Bool
5-
public let default_listing_type: Int
6-
public let default_sort_type: Int
5+
public let default_listing_type: ListingType
6+
public let default_sort_type: SortType
77
public let email: String?
88
public let email_verified: Bool
99
public let id: Int
@@ -21,8 +21,8 @@ public struct LocalUserSettings: Codable {
2121

2222
public init(
2323
accepted_application: Bool,
24-
default_listing_type: Int,
25-
default_sort_type: Int,
24+
default_listing_type: ListingType,
25+
default_sort_type: SortType,
2626
email: String? = nil,
2727
email_verified: Bool,
2828
id: Int,

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/LocalUserSettingsView.swift

-13
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Foundation
2+
3+
public struct LocalUserView: Codable {
4+
public let counts: PersonAggregates
5+
public let local_user: LocalUser
6+
public let person: Person
7+
8+
public init(counts: PersonAggregates, local_user: LocalUser, person: Person) {
9+
self.counts = counts
10+
self.local_user = local_user
11+
self.person = person
12+
}
13+
}

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/ModAddCommunityView.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import Foundation
33
public struct ModAddCommunityView: Codable {
44
public let community: CommunitySafe
55
public let mod_add_community: ModAddCommunity
6-
public let modded_person: PersonSafe
7-
public let moderator: PersonSafe
6+
public let modded_person: Person
7+
public let moderator: Person
88

99
public init(
1010
community: CommunitySafe,
1111
mod_add_community: ModAddCommunity,
12-
modded_person: PersonSafe,
13-
moderator: PersonSafe
12+
modded_person: Person,
13+
moderator: Person
1414
) {
1515
self.community = community
1616
self.mod_add_community = mod_add_community

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/ModAddView.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import Foundation
22

33
public struct ModAddView: Codable {
44
public let mod_add: ModAdd
5-
public let modded_person: PersonSafe
6-
public let moderator: PersonSafe?
5+
public let modded_person: Person
6+
public let moderator: Person?
77

8-
public init(mod_add: ModAdd, modded_person: PersonSafe, moderator: PersonSafe? = nil) {
8+
public init(mod_add: ModAdd, modded_person: Person, moderator: Person? = nil) {
99
self.mod_add = mod_add
1010
self.modded_person = modded_person
1111
self.moderator = moderator

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/ModBanFromCommunityView.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import Foundation
22

33
public struct ModBanFromCommunityView: Codable {
4-
public let banned_person: PersonSafe
4+
public let banned_person: Person
55
public let community: CommunitySafe
66
public let mod_ban_from_community: ModBanFromCommunity
7-
public let moderator: PersonSafe?
7+
public let moderator: Person?
88

99
public init(
10-
banned_person: PersonSafe,
10+
banned_person: Person,
1111
community: CommunitySafe,
1212
mod_ban_from_community: ModBanFromCommunity,
13-
moderator: PersonSafe? = nil
13+
moderator: Person? = nil
1414
) {
1515
self.banned_person = banned_person
1616
self.community = community

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/ModBanView.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import Foundation
22

33
public struct ModBanView: Codable {
4-
public let banned_person: PersonSafe
4+
public let banned_person: Person
55
public let mod_ban: ModBan
6-
public let moderator: PersonSafe?
6+
public let moderator: Person?
77

8-
public init(banned_person: PersonSafe, mod_ban: ModBan, moderator: PersonSafe? = nil) {
8+
public init(banned_person: Person, mod_ban: ModBan, moderator: Person? = nil) {
99
self.banned_person = banned_person
1010
self.mod_ban = mod_ban
1111
self.moderator = moderator

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/ModFeaturePostView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import Foundation
33
public struct ModFeaturePostView: Codable {
44
public let community: CommunitySafe
55
public let mod_feature_post: ModFeaturePost
6-
public let moderator: PersonSafe?
6+
public let moderator: Person?
77
public let post: Post
88

99
public init(
1010
community: CommunitySafe,
1111
mod_feature_post: ModFeaturePost,
12-
moderator: PersonSafe? = nil,
12+
moderator: Person? = nil,
1313
post: Post
1414
) {
1515
self.community = community

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/ModLockPostView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import Foundation
33
public struct ModLockPostView: Codable {
44
public let community: CommunitySafe
55
public let mod_lock_post: ModLockPost
6-
public let moderator: PersonSafe?
6+
public let moderator: Person?
77
public let post: Post
88

99
public init(
1010
community: CommunitySafe,
1111
mod_lock_post: ModLockPost,
12-
moderator: PersonSafe? = nil,
12+
moderator: Person? = nil,
1313
post: Post
1414
) {
1515
self.community = community

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/ModRemoveCommentView.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import Foundation
22

33
public struct ModRemoveCommentView: Codable {
44
public let comment: Comment
5-
public let commenter: PersonSafe
5+
public let commenter: Person
66
public let community: CommunitySafe
77
public let mod_remove_comment: ModRemoveComment
8-
public let moderator: PersonSafe?
8+
public let moderator: Person?
99
public let post: Post
1010

1111
public init(
1212
comment: Comment,
13-
commenter: PersonSafe,
13+
commenter: Person,
1414
community: CommunitySafe,
1515
mod_remove_comment: ModRemoveComment,
16-
moderator: PersonSafe? = nil,
16+
moderator: Person? = nil,
1717
post: Post
1818
) {
1919
self.comment = comment

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/ModRemoveCommunityView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import Foundation
33
public struct ModRemoveCommunityView: Codable {
44
public let community: CommunitySafe
55
public let mod_remove_community: ModRemoveCommunity
6-
public let moderator: PersonSafe?
6+
public let moderator: Person?
77

88
public init(
99
community: CommunitySafe,
1010
mod_remove_community: ModRemoveCommunity,
11-
moderator: PersonSafe? = nil
11+
moderator: Person? = nil
1212
) {
1313
self.community = community
1414
self.mod_remove_community = mod_remove_community

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/ModRemovePostView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import Foundation
33
public struct ModRemovePostView: Codable {
44
public let community: CommunitySafe
55
public let mod_remove_post: ModRemovePost
6-
public let moderator: PersonSafe?
6+
public let moderator: Person?
77
public let post: Post
88

99
public init(
1010
community: CommunitySafe,
1111
mod_remove_post: ModRemovePost,
12-
moderator: PersonSafe? = nil,
12+
moderator: Person? = nil,
1313
post: Post
1414
) {
1515
self.community = community

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/ModTransferCommunityView.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import Foundation
33
public struct ModTransferCommunityView: Codable {
44
public let community: CommunitySafe
55
public let mod_transfer_community: ModTransferCommunity
6-
public let modded_person: PersonSafe
7-
public let moderator: PersonSafe?
6+
public let modded_person: Person
7+
public let moderator: Person?
88

99
public init(
1010
community: CommunitySafe,
1111
mod_transfer_community: ModTransferCommunity,
12-
modded_person: PersonSafe,
13-
moderator: PersonSafe? = nil
12+
modded_person: Person,
13+
moderator: Person? = nil
1414
) {
1515
self.community = community
1616
self.mod_transfer_community = mod_transfer_community

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/MyUserInfo.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ public struct MyUserInfo: Codable {
44
public let community_blocks: [CommunityBlockView]
55
public let discussion_languages: [Int]
66
public let follows: [CommunityFolowerView]
7-
public let local_user_view: LocalUserSettingsView
7+
public let local_user_view: LocalUserView
88
public let moderates: [CommunityModeratorView]
99
public let person_blocks: [PersonBlockView]
1010

1111
public init(
1212
community_blocks: [CommunityBlockView],
1313
discussion_languages: [Int],
1414
follows: [CommunityFolowerView],
15-
local_user_view: LocalUserSettingsView,
15+
local_user_view: LocalUserView,
1616
moderates: [CommunityModeratorView],
1717
person_blocks: [PersonBlockView]
1818
) {

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/PersonBlockView.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import Foundation
22

33
public struct PersonBlockView: Codable {
4-
public let person: PersonSafe
5-
public let target: PersonSafe
4+
public let person: Person
5+
public let target: Person
66

7-
public init(person: PersonSafe, target: PersonSafe) {
7+
public init(person: Person, target: Person) {
88
self.person = person
99
self.target = target
1010
}

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/PersonMentionView.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ public struct PersonMentionView: Codable {
44
public let comment: Comment
55
public let community: CommunitySafe
66
public let counts: CommentAggregates
7-
public let creator: PersonSafe
7+
public let creator: Person
88
public let creator_banned_from_community: Bool
99
public let creator_blocked: Bool
1010
public let my_vote: Int?
1111
public let person_mention: PersonMention
1212
public let post: Post
13-
public let recipient: PersonSafe
13+
public let recipient: Person
1414
public let saved: Bool
1515
public let subscribed: SubscribedType
1616

1717
public init(
1818
comment: Comment,
1919
community: CommunitySafe,
2020
counts: CommentAggregates,
21-
creator: PersonSafe,
21+
creator: Person,
2222
creator_banned_from_community: Bool,
2323
creator_blocked: Bool,
2424
my_vote: Int? = nil,
2525
person_mention: PersonMention,
2626
post: Post,
27-
recipient: PersonSafe,
27+
recipient: Person,
2828
saved: Bool,
2929
subscribed: SubscribedType
3030
) {

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/PersonSafe.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
22

3-
public struct PersonSafe: Codable {
3+
public struct Person: Codable {
44
public let actor_id: String
55
public let admin: Bool
66
public let avatar: String?

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/PersonViewSafe.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import Foundation
22

33
public struct PersonViewSafe: Codable {
44
public let counts: PersonAggregates
5-
public let person: PersonSafe
5+
public let person: Person
66

7-
public init(counts: PersonAggregates, person: PersonSafe) {
7+
public init(counts: PersonAggregates, person: Person) {
88
self.counts = counts
99
self.person = person
1010
}

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/PostReportView.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@ import Foundation
33
public struct PostReportView: Codable {
44
public let community: CommunitySafe
55
public let counts: PostAggregates
6-
public let creator: PersonSafe
6+
public let creator: Person
77
public let creator_banned_from_community: Bool
88
public let my_vote: Int?
99
public let post: Post
10-
public let post_creator: PersonSafe
10+
public let post_creator: Person
1111
public let post_report: PostReport
12-
public let resolver: PersonSafe?
12+
public let resolver: Person?
1313

1414
public init(
1515
community: CommunitySafe,
1616
counts: PostAggregates,
17-
creator: PersonSafe,
17+
creator: Person,
1818
creator_banned_from_community: Bool,
1919
my_vote: Int? = nil,
2020
post: Post,
21-
post_creator: PersonSafe,
21+
post_creator: Person,
2222
post_report: PostReport,
23-
resolver: PersonSafe? = nil
23+
resolver: Person? = nil
2424
) {
2525
self.community = community
2626
self.counts = counts

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/PostView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Foundation
33
public struct PostView: Codable {
44
public let community: CommunitySafe
55
public let counts: PostAggregates
6-
public let creator: PersonSafe
6+
public let creator: Person
77
public let creator_banned_from_community: Bool
88
public let creator_blocked: Bool
99
public let my_vote: Int?
@@ -16,7 +16,7 @@ public struct PostView: Codable {
1616
public init(
1717
community: CommunitySafe,
1818
counts: PostAggregates,
19-
creator: PersonSafe,
19+
creator: Person,
2020
creator_banned_from_community: Bool,
2121
creator_blocked: Bool,
2222
my_vote: Int? = nil,

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/PrivateMessageReportView.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import Foundation
22

33
public struct PrivateMessageReportView: Codable {
4-
public let creator: PersonSafe
4+
public let creator: Person
55
public let private_message: PrivateMessage
6-
public let private_message_creator: PersonSafe
6+
public let private_message_creator: Person
77
public let private_message_report: PrivateMessageReport
8-
public let resolver: PersonSafe?
8+
public let resolver: Person?
99

1010
public init(
11-
creator: PersonSafe,
11+
creator: Person,
1212
private_message: PrivateMessage,
13-
private_message_creator: PersonSafe,
13+
private_message_creator: Person,
1414
private_message_report: PrivateMessageReport,
15-
resolver: PersonSafe? = nil
15+
resolver: Person? = nil
1616
) {
1717
self.creator = creator
1818
self.private_message = private_message

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/PrivateMessageView.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import Foundation
22

33
public struct PrivateMessageView: Codable {
4-
public let creator: PersonSafe
4+
public let creator: Person
55
public let private_message: PrivateMessage
6-
public let recipient: PersonSafe
6+
public let recipient: Person
77

8-
public init(creator: PersonSafe, private_message: PrivateMessage, recipient: PersonSafe) {
8+
public init(creator: Person, private_message: PrivateMessage, recipient: Person) {
99
self.creator = creator
1010
self.private_message = private_message
1111
self.recipient = recipient

‎Sources/Lemmy-Swift-Client/Lemmy API/Structs/RegistrationApplicationView.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import Foundation
22

33
public struct RegistrationApplicationView: Codable {
4-
public let admin: PersonSafe?
5-
public let creator: PersonSafe
6-
public let creator_local_user: LocalUserSettings
4+
public let admin: Person?
5+
public let creator: Person
6+
public let creator_local_user: LocalUser
77
public let registration_application: RegistrationApplication
88

99
public init(
10-
admin: PersonSafe? = nil,
11-
creator: PersonSafe,
12-
creator_local_user: LocalUserSettings,
10+
admin: Person? = nil,
11+
creator: Person,
12+
creator_local_user: LocalUser,
1313
registration_application: RegistrationApplication
1414
) {
1515
self.admin = admin

0 commit comments

Comments
 (0)
Please sign in to comment.