+
+ formatActor (
+ this: UserNotificationModelForApi,
+ accountOrChannel: UserNotificationIncludes.AccountIncludeActor | UserNotificationIncludes.VideoChannelIncludeActor
+ ) {
+ const avatar = accountOrChannel.Actor.Avatar
+ ? { path: accountOrChannel.Actor.Avatar.getStaticPath() }
+ : undefined
+
+ return {
+ id: accountOrChannel.id,
+ displayName: accountOrChannel.getDisplayName(),
+ name: accountOrChannel.Actor.preferredUsername,
+ host: accountOrChannel.Actor.getHost(),
+ avatar
+ }
+ }