Skip to content

Commit

Permalink
fix(#79-support-search): back serial name in notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
y9Kap committed Oct 30, 2023
1 parent 44e4782 commit b1c471c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ public data class MeetingSerializable(
val date: DateSerializable,
val location: LocationSerializable,
val title: String?,
val description: String?,
val description: String? = null,
val participantsCount: Int,
val previewParticipants: List<UserSerializable>,
val isParticipating: Boolean,
val avatarIdentity: FileIdSerializable?,
val avatarId: FileIdSerializable? = null,
val visibility: Visibility
) {
@Serializable
Expand All @@ -49,7 +49,7 @@ public fun MeetingSerializable.type(): Meeting = Meeting(
participantsCount = participantsCount,
previewParticipants = previewParticipants.map { it.type() },
isParticipating = isParticipating,
avatarId = avatarIdentity?.type(),
avatarId = avatarId?.type(),
visibility = visibility.type()
)

Expand All @@ -73,7 +73,7 @@ public fun Meeting.serializable(): MeetingSerializable = MeetingSerializable(
participantsCount = participantsCount,
previewParticipants = previewParticipants.map { it.serializable() },
isParticipating = isParticipating,
avatarIdentity = avatarId?.serializable(),
avatarId = avatarId?.serializable(),
visibility = visibility.serializable()
)

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public sealed class NotificationSerializable {
public abstract val isNew: Boolean
public abstract val date: DateTimeSerializable

@SerialName("subscription")
@Serializable
public class Subscription(
override val isNew: Boolean,
Expand All @@ -25,6 +26,7 @@ public sealed class NotificationSerializable {
public val subscriber: UserSerializable,
) : NotificationSerializable()

@SerialName("meeting_invitation")
@Serializable
public class Invitation(
override val id: NotificationIdSerializable,
Expand Down

0 comments on commit b1c471c

Please sign in to comment.