That fuck shit the fascists are using
at master 56 lines 1.5 kB view raw
1package org.tm.archive.messagerequests 2 3/** 4 * Data necessary to render message request view. 5 */ 6data class MessageRequestState @JvmOverloads constructor(val state: State = State.NONE, val reportedAsSpam: Boolean = false) { 7 8 companion object { 9 @JvmField 10 val NONE = MessageRequestState() 11 12 @JvmField 13 val DEPRECATED_V1 = MessageRequestState() 14 } 15 16 val isAccepted: Boolean 17 get() = state == State.NONE || state == State.NONE_HIDDEN 18 19 val isBlocked: Boolean 20 get() = state == State.INDIVIDUAL_BLOCKED || state == State.BLOCKED_GROUP 21 22 /** 23 * An enum representing the possible message request states a user can be in. 24 */ 25 enum class State { 26 /** No message request necessary */ 27 NONE, 28 29 /** No message request necessary as the user was hidden after accepting */ 30 NONE_HIDDEN, 31 32 /** A group is blocked */ 33 BLOCKED_GROUP, 34 35 /** An individual conversation that existed pre-message-requests but doesn't have profile sharing enabled */ 36 LEGACY_INDIVIDUAL, 37 38 /** A V1 group conversation that is no longer allowed, because we've forced GV2 on. */ 39 DEPRECATED_GROUP_V1, 40 41 /** An invite response is needed for a V2 group */ 42 GROUP_V2_INVITE, 43 44 /** A message request is needed for a V2 group */ 45 GROUP_V2_ADD, 46 47 /** A message request is needed for an individual */ 48 INDIVIDUAL, 49 50 /** A user is blocked */ 51 INDIVIDUAL_BLOCKED, 52 53 /** A message request is needed for an individual since they have been hidden */ 54 INDIVIDUAL_HIDDEN 55 } 56}