@@ -54,6 +54,7 @@ abstract class DetailedUserModel with _$DetailedUserModel {
5454 required bool ? isFollowerOfUser,
5555 required bool ? isBlockedByUser,
5656 required NotificationControlStatus ? notificationControlStatus,
57+ required String ? apId,
5758 }) = _DetailedUserModel ;
5859
5960 factory DetailedUserModel .fromMbin (JsonMap json) {
@@ -75,6 +76,7 @@ abstract class DetailedUserModel with _$DetailedUserModel {
7576 : NotificationControlStatus .fromJson (
7677 json['notificationStatus' ] as String ,
7778 ),
79+ apId: json['apProfileId' ] as String ? ,
7880 );
7981
8082 userMentionCache[user.name] = user;
@@ -99,6 +101,7 @@ abstract class DetailedUserModel with _$DetailedUserModel {
99101 isFollowerOfUser: null ,
100102 isBlockedByUser: (json['blocked' ] as bool ? ) ?? false ,
101103 notificationControlStatus: null ,
104+ apId: lemmyPerson['actor_id' ] as String ,
102105 );
103106 }
104107
@@ -123,6 +126,7 @@ abstract class DetailedUserModel with _$DetailedUserModel {
123126 : json['activity_alert' ] as bool
124127 ? NotificationControlStatus .loud
125128 : NotificationControlStatus .default_,
129+ apId: piefedPerson['actor_id' ] as String ,
126130 );
127131 }
128132}
@@ -135,6 +139,7 @@ abstract class UserModel with _$UserModel {
135139 required ImageModel ? avatar,
136140 required DateTime ? createdAt,
137141 required bool isBot,
142+ required String ? apId,
138143 }) = _UserModel ;
139144
140145 factory UserModel .fromMbin (JsonMap json) => UserModel (
@@ -143,6 +148,7 @@ abstract class UserModel with _$UserModel {
143148 avatar: mbinGetOptionalImage (json['avatar' ] as JsonMap ? ),
144149 createdAt: optionalDateTime (json['createdAt' ] as String ? ),
145150 isBot: (json['isBot' ] ?? false ) as bool ,
151+ apId: json['apProfileId' ] as String ? ,
146152 );
147153
148154 factory UserModel .fromLemmy (JsonMap json) => UserModel (
@@ -151,6 +157,7 @@ abstract class UserModel with _$UserModel {
151157 avatar: lemmyGetOptionalImage (json['avatar' ] as String ? ),
152158 createdAt: DateTime .parse (json['published' ] as String ),
153159 isBot: json['bot_account' ] as bool ,
160+ apId: json['actor_id' ] as String ,
154161 );
155162
156163 factory UserModel .fromPiefed (JsonMap json) => UserModel (
@@ -159,6 +166,7 @@ abstract class UserModel with _$UserModel {
159166 avatar: lemmyGetOptionalImage (json['avatar' ] as String ? ),
160167 createdAt: DateTime .parse (json['published' ] as String ),
161168 isBot: json['bot' ] as bool ,
169+ apId: json['actor_id' ] as String ,
162170 );
163171
164172 factory UserModel .fromDetailedUser (DetailedUserModel user) => UserModel (
@@ -167,6 +175,7 @@ abstract class UserModel with _$UserModel {
167175 avatar: user.avatar,
168176 createdAt: user.createdAt,
169177 isBot: user.isBot,
178+ apId: user.apId,
170179 );
171180}
172181
0 commit comments