@@ -126,7 +126,7 @@ const waitForRoomEvent = async (
126126 subscriptionInvite = await getSubscriptionByRoomId ( rcRoom . _id , rcUserConfig . credentials , rcUserConfig . request ) ;
127127
128128 expect ( subscriptionInvite ) . toHaveProperty ( 'status' , 'INVITED' ) ;
129- expect ( subscriptionInvite ) . toHaveProperty ( 'fname' , `@ ${ federationConfig . hs1 . adminUser } : ${ federationConfig . hs1 . domain } ` ) ;
129+ expect ( subscriptionInvite ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminUser ) ;
130130 } ) ;
131131 } ) ;
132132
@@ -153,7 +153,7 @@ const waitForRoomEvent = async (
153153 it ( 'should display the fname properly' , async ( ) => {
154154 const sub = await getSubscriptionByRoomId ( rcRoom . _id , rcUserConfig . credentials , rcUserConfig . request ) ;
155155
156- expect ( sub ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminMatrixUserId ) ;
156+ expect ( sub ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminUser ) ;
157157 } ) ;
158158
159159 it ( 'should return own user name as the room name when user is alone in the DM' , async ( ) => {
@@ -236,7 +236,7 @@ const waitForRoomEvent = async (
236236 subscriptionInvite = await getSubscriptionByRoomId ( rcRoom . _id , rcUserConfig . credentials , rcUserConfig . request ) ;
237237
238238 expect ( subscriptionInvite ) . toHaveProperty ( 'status' , 'INVITED' ) ;
239- expect ( subscriptionInvite ) . toHaveProperty ( 'fname' , `@ ${ federationConfig . hs1 . adminUser } : ${ federationConfig . hs1 . domain } ` ) ;
239+ expect ( subscriptionInvite ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminUser ) ;
240240 } ) ;
241241 } ) ;
242242
@@ -264,7 +264,7 @@ const waitForRoomEvent = async (
264264 it ( 'should display the fname properly' , async ( ) => {
265265 const sub = await getSubscriptionByRoomId ( rcRoom . _id , rcUserConfig . credentials , rcUserConfig . request ) ;
266266
267- expect ( sub ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminMatrixUserId ) ;
267+ expect ( sub ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminUser ) ;
268268 } ) ;
269269
270270 it ( 'should be able to leave the DM from Rocket.Chat' , async ( ) => {
@@ -412,7 +412,7 @@ const waitForRoomEvent = async (
412412 const sub = await getSubscriptionByRoomId ( rcRoom . _id , rcUserConfig . credentials , rcUserConfig . request ) ;
413413
414414 // After acceptance, should display the Synapse user's ID
415- expect ( sub ) . toHaveProperty ( 'fname' , federationConfig . hs1 . additionalUser1 . matrixUserId ) ;
415+ expect ( sub ) . toHaveProperty ( 'fname' , federationConfig . hs1 . additionalUser1 . username ) ;
416416 } ) ;
417417 } ) ;
418418
@@ -543,8 +543,7 @@ const waitForRoomEvent = async (
543543 pendingInvitation1 = await getSubscriptionByRoomId ( rcRoom1 . _id , rcUserConfig1 . credentials , rcUserConfig1 . request ) ;
544544
545545 expect ( pendingInvitation1 ) . toHaveProperty ( 'status' , 'INVITED' ) ;
546- expect ( pendingInvitation1 ) . toHaveProperty ( 'fname' , `@${ federationConfig . hs1 . adminUser } :${ federationConfig . hs1 . domain } ` ) ;
547- expect ( pendingInvitation1 ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminMatrixUserId ) ;
546+ expect ( pendingInvitation1 ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminUser ) ;
548547 } ) ;
549548
550549 it ( 'should have user1 as regular user of the group DM on RC' , async ( ) => {
@@ -556,8 +555,7 @@ const waitForRoomEvent = async (
556555 pendingInvitation2 = await getSubscriptionByRoomId ( rcRoom1 . _id , rcUserConfig2 . credentials , rcUserConfig2 . request ) ;
557556
558557 expect ( pendingInvitation2 ) . toHaveProperty ( 'status' , 'INVITED' ) ;
559- expect ( pendingInvitation2 ) . toHaveProperty ( 'fname' , `@${ federationConfig . hs1 . adminUser } :${ federationConfig . hs1 . domain } ` ) ;
560- expect ( pendingInvitation2 ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminMatrixUserId ) ;
558+ expect ( pendingInvitation2 ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminUser ) ;
561559 } ) ;
562560
563561 it ( 'should have user2 as regular user of the group DM on RC' , async ( ) => {
@@ -582,7 +580,7 @@ const waitForRoomEvent = async (
582580
583581 expect ( sub ) . not . toHaveProperty ( 'status' ) ;
584582 expect ( sub ) . toHaveProperty ( 'name' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ userDm2 } ` ) ;
585- expect ( sub ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ userDm2Name } ` ) ;
583+ expect ( sub ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminUser } , ${ userDm2Name } ` ) ;
586584 } ,
587585 { delayMs : 100 } ,
588586 ) ;
@@ -778,7 +776,7 @@ const waitForRoomEvent = async (
778776 const pendingInvitationB = await getSubscriptionByRoomId ( rcRoomConverted . _id , rcUserConfigB . credentials , rcUserConfigB . request ) ;
779777
780778 expect ( pendingInvitationB ) . toHaveProperty ( 'status' , 'INVITED' ) ;
781- expect ( pendingInvitationB ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminMatrixUserId ) ;
779+ expect ( pendingInvitationB ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminUser ) ;
782780 } ) ;
783781
784782 const membersInMatrix = await hs1RoomConverted . getMembers ( ) ;
@@ -809,14 +807,14 @@ const waitForRoomEvent = async (
809807
810808 expect ( subA ) . not . toHaveProperty ( 'status' ) ;
811809 expect ( subA ) . toHaveProperty ( 'name' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ userDmB } ` ) ;
812- expect ( subA ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ userDmBName } ` ) ;
810+ expect ( subA ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminUser } , ${ userDmBName } ` ) ;
813811
814812 // Check userB's subscription
815813 const subB = await getSubscriptionByRoomId ( rcRoomConverted . _id , rcUserConfigB . credentials , rcUserConfigB . request ) ;
816814
817815 expect ( subB ) . not . toHaveProperty ( 'status' ) ;
818816 expect ( subB ) . toHaveProperty ( 'name' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ userDmA } ` ) ;
819- expect ( subB ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ userDmAName } ` ) ;
817+ expect ( subB ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminUser } , ${ userDmAName } ` ) ;
820818 } ,
821819 { delayMs : 100 } ,
822820 ) ;
@@ -944,15 +942,15 @@ const waitForRoomEvent = async (
944942
945943 // Should contain both invited users in the name
946944 expect ( sub ) . toHaveProperty ( 'name' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ rcUser2 . username } ` ) ;
947- expect ( sub ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ rcUser2 . fullName } ` ) ;
945+ expect ( sub ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminUser } , ${ rcUser2 . fullName } ` ) ;
948946 } ) ;
949947
950948 it ( "should display only the inviter's username for the invited user on Rocket.Chat" , async ( ) => {
951949 const sub = await getSubscriptionByRoomId ( rcRoom . _id , rcUser2 . config . credentials , rcUser2 . config . request ) ;
952950
953951 expect ( sub ) . toHaveProperty ( 'status' , 'INVITED' ) ;
954952 expect ( sub ) . toHaveProperty ( 'name' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ rcUser1 . username } ` ) ;
955- expect ( sub ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ rcUser1 . fullName } ` ) ;
953+ expect ( sub ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminUser } , ${ rcUser1 . fullName } ` ) ;
956954 } ) ;
957955
958956 it ( 'should accept the invitation on Synapse' , async ( ) => {
@@ -979,7 +977,7 @@ const waitForRoomEvent = async (
979977
980978 expect ( sub ) . toHaveProperty ( 'status' , 'INVITED' ) ;
981979 expect ( sub ) . toHaveProperty ( 'name' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ rcUser1 . username } ` ) ;
982- expect ( sub ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ rcUser1 . fullName } ` ) ;
980+ expect ( sub ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminUser } , ${ rcUser1 . fullName } ` ) ;
983981 } ,
984982 { delayMs : 100 } ,
985983 ) ;
@@ -1254,7 +1252,7 @@ const waitForRoomEvent = async (
12541252 const sub = await getSubscriptionByRoomId ( rcRoom . _id , rcUser2 . config . credentials , rcUser2 . config . request ) ;
12551253
12561254 // After acceptance, should display the Synapse user's ID
1257- expect ( sub ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ rcUser1 . fullName } ` ) ;
1255+ expect ( sub ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminUser } , ${ rcUser1 . fullName } ` ) ;
12581256 } ) ;
12591257
12601258 // Then create non-federated DM between rcUser1 and rcUser2 which should be returned on duplication
@@ -1439,7 +1437,7 @@ const waitForRoomEvent = async (
14391437 const sub = await getSubscriptionByRoomId ( rcRoom1on1 . _id , rcUser1 . config . credentials , rcUser1 . config . request ) ;
14401438
14411439 // After acceptance, should display the Synapse user's ID
1442- expect ( sub ) . toHaveProperty ( 'fname' , ` ${ federationConfig . hs1 . adminMatrixUserId } ` ) ;
1440+ expect ( sub ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminUser ) ;
14431441 } ) ;
14441442 } ) ;
14451443
@@ -1489,7 +1487,7 @@ const waitForRoomEvent = async (
14891487 const sub = await getSubscriptionByRoomId ( rcRoom . _id , rcUser2 . config . credentials , rcUser2 . config . request ) ;
14901488
14911489 // After acceptance, should display the Synapse user's ID
1492- expect ( sub ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminMatrixUserId } , ${ rcUser1 . fullName } ` ) ;
1490+ expect ( sub ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminUser } , ${ rcUser1 . fullName } ` ) ;
14931491 } ,
14941492 { delayMs : 100 } ,
14951493 ) ;
@@ -1704,7 +1702,7 @@ const waitForRoomEvent = async (
17041702
17051703 // Should contain both invited users in the name
17061704 expect ( sub ) . toHaveProperty ( 'name' , federationConfig . hs1 . adminMatrixUserId ) ;
1707- expect ( sub ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminMatrixUserId ) ;
1705+ expect ( sub ) . toHaveProperty ( 'fname' , federationConfig . hs1 . adminUser ) ;
17081706 } ) ;
17091707
17101708 it ( 'should send an invite to another Synapse user' , async ( ) => {
@@ -1740,10 +1738,7 @@ const waitForRoomEvent = async (
17401738 'name' ,
17411739 `${ federationConfig . hs1 . adminMatrixUserId } , ${ federationConfig . hs1 . additionalUser1 . matrixUserId } ` ,
17421740 ) ;
1743- expect ( subA ) . toHaveProperty (
1744- 'fname' ,
1745- `${ federationConfig . hs1 . adminMatrixUserId } , ${ federationConfig . hs1 . additionalUser1 . matrixUserId } ` ,
1746- ) ;
1741+ expect ( subA ) . toHaveProperty ( 'fname' , `${ federationConfig . hs1 . adminUser } , ${ federationConfig . hs1 . additionalUser1 . username } ` ) ;
17471742 } ,
17481743 { delayMs : 100 } ,
17491744 ) ;
@@ -1778,7 +1773,7 @@ const waitForRoomEvent = async (
17781773
17791774 expect ( sub ) . toHaveProperty ( 'status' , 'INVITED' ) ;
17801775 expect ( sub ) . toHaveProperty ( 'name' , federationConfig . hs1 . additionalUser1 . matrixUserId ) ;
1781- expect ( sub ) . toHaveProperty ( 'fname' , federationConfig . hs1 . additionalUser1 . matrixUserId ) ;
1776+ expect ( sub ) . toHaveProperty ( 'fname' , federationConfig . hs1 . additionalUser1 . username ) ;
17821777 } ,
17831778 { delayMs : 100 } ,
17841779 ) ;
0 commit comments