cli: change default member role from "admin" to "member" (#2915)
This commit is contained in:
parent
1cc14346b0
commit
e326227d06
@ -5150,7 +5150,7 @@ chatCommandP =
|
||||
("/help" <|> "/h") $> ChatHelp HSMain,
|
||||
("/group " <|> "/g ") *> char_ '#' *> (NewGroup <$> groupProfile),
|
||||
"/_group " *> (APINewGroup <$> A.decimal <* A.space <*> jsonP),
|
||||
("/add " <|> "/a ") *> char_ '#' *> (AddMember <$> displayName <* A.space <* char_ '@' <*> displayName <*> (memberRole <|> pure GRAdmin)),
|
||||
("/add " <|> "/a ") *> char_ '#' *> (AddMember <$> displayName <* A.space <* char_ '@' <*> displayName <*> (memberRole <|> pure GRMember)),
|
||||
("/join " <|> "/j ") *> char_ '#' *> (JoinGroup <$> displayName),
|
||||
("/member role " <|> "/mr ") *> char_ '#' *> (MemberRole <$> displayName <* A.space <* char_ '@' <*> displayName <*> memberRole),
|
||||
("/remove " <|> "/rm ") *> char_ '#' *> (RemoveMember <$> displayName <* A.space <* char_ '@' <*> displayName),
|
||||
|
@ -82,7 +82,7 @@ testGroupShared alice bob cath checkMessages = do
|
||||
alice ##> "/g team"
|
||||
alice <## "group #team is created"
|
||||
alice <## "to add members use /a team <name> or /create link #team"
|
||||
alice ##> "/a team bob"
|
||||
alice ##> "/a team bob admin"
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #team sent to bob",
|
||||
do
|
||||
@ -94,7 +94,7 @@ testGroupShared alice bob cath checkMessages = do
|
||||
(alice <## "#team: bob joined the group")
|
||||
(bob <## "#team: you joined the group")
|
||||
when checkMessages $ threadDelay 1000000 -- for deterministic order of messages and "connected" events
|
||||
alice ##> "/a team cath"
|
||||
alice ##> "/a team cath admin"
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #team sent to cath",
|
||||
do
|
||||
@ -242,14 +242,14 @@ testGroup2 =
|
||||
alice ##> "/g club"
|
||||
alice <## "group #club is created"
|
||||
alice <## "to add members use /a club <name> or /create link #club"
|
||||
alice ##> "/a club bob"
|
||||
alice ##> "/a club bob admin"
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #club sent to bob",
|
||||
do
|
||||
bob <## "#club: alice invites you to join the group as admin"
|
||||
bob <## "use /j club to accept"
|
||||
]
|
||||
alice ##> "/a club cath"
|
||||
alice ##> "/a club cath admin"
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #club sent to cath",
|
||||
do
|
||||
@ -274,7 +274,7 @@ testGroup2 =
|
||||
concurrentlyN_
|
||||
[ bob <## "invitation to join the group #club sent to dan",
|
||||
do
|
||||
dan <## "#club: bob invites you to join the group as admin"
|
||||
dan <## "#club: bob invites you to join the group as member"
|
||||
dan <## "use /j club to accept"
|
||||
]
|
||||
dan ##> "/j club"
|
||||
@ -486,7 +486,7 @@ testGroupDeleteWhenInvited =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #team sent to bob",
|
||||
do
|
||||
bob <## "#team: alice invites you to join the group as admin"
|
||||
bob <## "#team: alice invites you to join the group as member"
|
||||
bob <## "use /j team to accept"
|
||||
]
|
||||
bob ##> "/d #team"
|
||||
@ -497,7 +497,7 @@ testGroupDeleteWhenInvited =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #team sent to bob",
|
||||
do
|
||||
bob <## "#team: alice invites you to join the group as admin"
|
||||
bob <## "#team: alice invites you to join the group as member"
|
||||
bob <## "use /j team to accept"
|
||||
]
|
||||
|
||||
@ -513,7 +513,7 @@ testGroupReAddInvited =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #team sent to bob",
|
||||
do
|
||||
bob <## "#team: alice invites you to join the group as admin"
|
||||
bob <## "#team: alice invites you to join the group as member"
|
||||
bob <## "use /j team to accept"
|
||||
]
|
||||
-- alice re-adds bob, he sees it as the same group
|
||||
@ -521,7 +521,7 @@ testGroupReAddInvited =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #team sent to bob",
|
||||
do
|
||||
bob <## "#team: alice invites you to join the group as admin"
|
||||
bob <## "#team: alice invites you to join the group as member"
|
||||
bob <## "use /j team to accept"
|
||||
]
|
||||
-- if alice removes bob and then re-adds him, she uses a new connection request
|
||||
@ -532,7 +532,7 @@ testGroupReAddInvited =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #team sent to bob",
|
||||
do
|
||||
bob <## "#team_1: alice invites you to join the group as admin"
|
||||
bob <## "#team_1: alice invites you to join the group as member"
|
||||
bob <## "use /j team_1 to accept"
|
||||
]
|
||||
|
||||
@ -548,7 +548,7 @@ testGroupReAddInvitedChangeRole =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #team sent to bob",
|
||||
do
|
||||
bob <## "#team: alice invites you to join the group as admin"
|
||||
bob <## "#team: alice invites you to join the group as member"
|
||||
bob <## "use /j team to accept"
|
||||
]
|
||||
-- alice re-adds bob, he sees it as the same group
|
||||
@ -588,7 +588,7 @@ testGroupDeleteInvitedContact =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #team sent to bob",
|
||||
do
|
||||
bob <## "#team: alice invites you to join the group as admin"
|
||||
bob <## "#team: alice invites you to join the group as member"
|
||||
bob <## "use /j team to accept"
|
||||
]
|
||||
threadDelay 500000
|
||||
@ -621,7 +621,7 @@ testDeleteGroupMemberProfileKept =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #team sent to bob",
|
||||
do
|
||||
bob <## "#team: alice invites you to join the group as admin"
|
||||
bob <## "#team: alice invites you to join the group as member"
|
||||
bob <## "use /j team to accept"
|
||||
]
|
||||
bob ##> "/j team"
|
||||
@ -640,7 +640,7 @@ testDeleteGroupMemberProfileKept =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #club sent to bob",
|
||||
do
|
||||
bob <## "#club: alice invites you to join the group as admin"
|
||||
bob <## "#club: alice invites you to join the group as member"
|
||||
bob <## "use /j club to accept"
|
||||
]
|
||||
bob ##> "/j club"
|
||||
@ -693,7 +693,7 @@ testGroupRemoveAdd =
|
||||
]
|
||||
alice ##> "/a team bob"
|
||||
alice <## "invitation to join the group #team sent to bob"
|
||||
bob <## "#team_1: alice invites you to join the group as admin"
|
||||
bob <## "#team_1: alice invites you to join the group as member"
|
||||
bob <## "use /j team_1 to accept"
|
||||
bob ##> "/j team_1"
|
||||
concurrentlyN_
|
||||
@ -734,7 +734,7 @@ testGroupList =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #tennis sent to bob",
|
||||
do
|
||||
bob <## "#tennis: alice invites you to join the group as admin"
|
||||
bob <## "#tennis: alice invites you to join the group as member"
|
||||
bob <## "use /j tennis to accept"
|
||||
]
|
||||
-- alice sees both groups
|
||||
@ -1177,7 +1177,7 @@ testGroupDeleteUnusedContacts =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #club sent to bob",
|
||||
do
|
||||
bob <## "#club: alice invites you to join the group as admin"
|
||||
bob <## "#club: alice invites you to join the group as member"
|
||||
bob <## "use /j club to accept"
|
||||
]
|
||||
bob ##> "/j club"
|
||||
@ -1188,7 +1188,7 @@ testGroupDeleteUnusedContacts =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #club sent to cath",
|
||||
do
|
||||
cath <## "#club: alice invites you to join the group as admin"
|
||||
cath <## "#club: alice invites you to join the group as member"
|
||||
cath <## "use /j club to accept"
|
||||
]
|
||||
cath ##> "/j club"
|
||||
@ -1831,7 +1831,7 @@ testGroupLinkIncognitoMembership =
|
||||
alice <## "group #team is created"
|
||||
alice <## "to add members use /a team <name> or /create link #team"
|
||||
-- alice invites bob
|
||||
alice ##> ("/a team " <> bobIncognito)
|
||||
alice ##> ("/a team " <> bobIncognito <> " admin")
|
||||
concurrentlyN_
|
||||
[ alice <## ("invitation to join the group #team sent to " <> bobIncognito),
|
||||
do
|
||||
@ -2456,7 +2456,7 @@ testConfigureGroupDeliveryReceipts tmp =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #club sent to bob",
|
||||
do
|
||||
bob <## "#club: alice invites you to join the group as admin"
|
||||
bob <## "#club: alice invites you to join the group as member"
|
||||
bob <## "use /j club to accept"
|
||||
]
|
||||
bob ##> "/j club"
|
||||
@ -2467,7 +2467,7 @@ testConfigureGroupDeliveryReceipts tmp =
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #club sent to cath",
|
||||
do
|
||||
cath <## "#club: alice invites you to join the group as admin"
|
||||
cath <## "#club: alice invites you to join the group as member"
|
||||
cath <## "use /j club to accept"
|
||||
]
|
||||
cath ##> "/j club"
|
||||
|
@ -785,7 +785,7 @@ testJoinGroupIncognito = testChat4 aliceProfile bobProfile cathProfile danProfil
|
||||
alice <## "group #secret_club is created"
|
||||
alice <## "to add members use /a secret_club <name> or /create link #secret_club"
|
||||
-- alice invites bob
|
||||
alice ##> "/a secret_club bob"
|
||||
alice ##> "/a secret_club bob admin"
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #secret_club sent to bob",
|
||||
do
|
||||
@ -797,7 +797,7 @@ testJoinGroupIncognito = testChat4 aliceProfile bobProfile cathProfile danProfil
|
||||
(alice <## "#secret_club: bob joined the group")
|
||||
(bob <## "#secret_club: you joined the group")
|
||||
-- alice invites cath
|
||||
alice ##> ("/a secret_club " <> cathIncognito)
|
||||
alice ##> ("/a secret_club " <> cathIncognito <> " admin")
|
||||
concurrentlyN_
|
||||
[ alice <## ("invitation to join the group #secret_club sent to " <> cathIncognito),
|
||||
do
|
||||
@ -819,7 +819,7 @@ testJoinGroupIncognito = testChat4 aliceProfile bobProfile cathProfile danProfil
|
||||
cath ##> "/a secret_club dan"
|
||||
cath <## "you've connected to this group using an incognito profile - prohibited to invite contacts"
|
||||
-- alice invites dan
|
||||
alice ##> "/a secret_club dan"
|
||||
alice ##> "/a secret_club dan admin"
|
||||
concurrentlyN_
|
||||
[ alice <## "invitation to join the group #secret_club sent to dan",
|
||||
do
|
||||
@ -1045,7 +1045,7 @@ testDeleteContactThenGroupDeletesIncognitoProfile = testChat2 aliceProfile bobPr
|
||||
concurrentlyN_
|
||||
[ alice <## ("invitation to join the group #team sent to " <> bobIncognito),
|
||||
do
|
||||
bob <## "#team: alice invites you to join the group as admin"
|
||||
bob <## "#team: alice invites you to join the group as member"
|
||||
bob <## ("use /j team to join incognito as " <> bobIncognito)
|
||||
]
|
||||
bob ##> "/j team"
|
||||
@ -1096,7 +1096,7 @@ testDeleteGroupThenContactDeletesIncognitoProfile = testChat2 aliceProfile bobPr
|
||||
concurrentlyN_
|
||||
[ alice <## ("invitation to join the group #team sent to " <> bobIncognito),
|
||||
do
|
||||
bob <## "#team: alice invites you to join the group as admin"
|
||||
bob <## "#team: alice invites you to join the group as member"
|
||||
bob <## ("use /j team to join incognito as " <> bobIncognito)
|
||||
]
|
||||
bob ##> "/j team"
|
||||
|
Loading…
Reference in New Issue
Block a user