Skip to content

Commit

Permalink
chore: Remove self user creator [WPB-11559]
Browse files Browse the repository at this point in the history
  • Loading branch information
m-zagorski committed Nov 21, 2024
1 parent 08c0cff commit 154c6b4
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ sealed class ConversationDetails(open val conversation: Conversation) {
override val conversation: Conversation,
val hasOngoingCall: Boolean = false,
val isSelfUserMember: Boolean,
val isSelfUserCreator: Boolean,
val selfRole: Conversation.Member.Role?
// val isTeamAdmin: Boolean, TODO kubaz
) : ConversationDetails(conversation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ internal class ConversationMapperImpl(
conversation = fromConversationViewToEntity(daoModel),
hasOngoingCall = callStatus != null, // todo: we can do better!
isSelfUserMember = isMember,
isSelfUserCreator = isCreator == 1L,
selfRole = selfRole?.let { conversationRoleMapper.fromDAO(it) }
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ class CallRepositoryTest {
Arrangement.groupConversation,
false,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)
)
Expand Down Expand Up @@ -212,7 +211,6 @@ class CallRepositoryTest {
ConversationDetails.Group(
Arrangement.groupConversation,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)
)
Expand Down Expand Up @@ -266,7 +264,6 @@ class CallRepositoryTest {
ConversationDetails.Group(
Arrangement.groupConversation,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)
)
Expand Down Expand Up @@ -309,7 +306,6 @@ class CallRepositoryTest {
ConversationDetails.Group(
Arrangement.groupConversation,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)
)
Expand Down Expand Up @@ -366,7 +362,6 @@ class CallRepositoryTest {
ConversationDetails.Group(
Arrangement.groupConversation,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ class EndCallOnConversationChangeUseCaseTest {
conversation = conversation,
hasOngoingCall = true,
isSelfUserMember = false,
isSelfUserCreator = false,
selfRole = null
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@ class ObserveConversationDetailsUseCaseTest {
ConversationDetails.Group(
conversation,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)
),
Either.Right(
ConversationDetails.Group(
conversation.copy(name = "New Name"),
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class ObserveConversationListDetailsUseCaseTest {
ConversationDetails.Group(
groupConversation,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)

Expand Down Expand Up @@ -100,14 +99,12 @@ class ObserveConversationListDetailsUseCaseTest {
ConversationDetails.Group(
groupConversation1,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)
val groupConversationDetails2 =
ConversationDetails.Group(
groupConversation2,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)

Expand Down Expand Up @@ -141,7 +138,6 @@ class ObserveConversationListDetailsUseCaseTest {
val groupConversationDetails = ConversationDetails.Group(
conversation = groupConversation,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)

Expand Down Expand Up @@ -175,7 +171,6 @@ class ObserveConversationListDetailsUseCaseTest {
ConversationDetails.Group(
groupConversation,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)
)
Expand Down Expand Up @@ -223,7 +218,6 @@ class ObserveConversationListDetailsUseCaseTest {
val groupConversationDetails = ConversationDetails.Group(
groupConversation,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)

Expand Down Expand Up @@ -258,7 +252,6 @@ class ObserveConversationListDetailsUseCaseTest {
val groupConversationDetails = ConversationDetails.Group(
groupConversation,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)

Expand Down Expand Up @@ -287,7 +280,6 @@ class ObserveConversationListDetailsUseCaseTest {
val groupConversationDetails = ConversationDetails.Group(
groupConversation,
isSelfUserMember = true,
isSelfUserCreator = true,
selfRole = Conversation.Member.Role.Member
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ object TestConversationDetails {

val CONVERSATION_GROUP = ConversationDetails.Group(
conversation = TestConversation.GROUP(),
isSelfUserCreator = true,
isSelfUserMember = true,
selfRole = Conversation.Member.Role.Member
)
Expand Down

0 comments on commit 154c6b4

Please sign in to comment.