Skip to content

Commit

Permalink
Review feedback + change cmt value
Browse files Browse the repository at this point in the history
  • Loading branch information
wkal-pubnub committed Nov 27, 2024
1 parent a4a5c36 commit 0ed259d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class File(
/**
* Represents the content of various types of events emitted during chat operations.
* This is a sealed class with different subclasses representing specific types of events.
*
* @property customMessageType the `customMessageType` that will be passed as a parameter into
* [com.pubnub.api.PubNub.publish] or [com.pubnub.api.PubNub.signal] when sending this event.
*/
@Serializable
sealed class EventContent(
Expand Down Expand Up @@ -122,7 +125,7 @@ sealed class EventContent(
@Serializable
@SerialName("moderation")
class Moderation(val channelId: String, val restriction: RestrictionType, val reason: String? = null) :
EventContent("moderation")
EventContent(CUSTOM_MESSAGE_TYPE_MODERATED)

/**
* Represents a text message event, containing the message text and any associated files.
Expand Down Expand Up @@ -191,3 +194,5 @@ enum class EmitEventMethod {
*/
PUBLISH
}

private const val CUSTOM_MESSAGE_TYPE_MODERATED = "moderated"

0 comments on commit 0ed259d

Please sign in to comment.