From 9a34802c973fa3de33342a6e2e49fa4ca22df379 Mon Sep 17 00:00:00 2001 From: Aleksander Nicacio da Silva Date: Sun, 7 Dec 2025 15:56:12 -0300 Subject: [PATCH 1/7] feat: added invitation date to UserInfo --- .../client/components/UserInfo/UserInfo.tsx | 9 +++++++++ .../RoomMembers/RoomMembersItem.tsx | 12 ++++++++++- .../RoomMembers/RoomMembersWithData.tsx | 20 +++++++++++++------ .../UserInfo/UserInfoWithData.tsx | 11 ++++++++-- packages/i18n/src/locales/en.i18n.json | 1 + 5 files changed, 44 insertions(+), 9 deletions(-) diff --git a/apps/meteor/client/components/UserInfo/UserInfo.tsx b/apps/meteor/client/components/UserInfo/UserInfo.tsx index 28a82c3835da1..59ddb7710a921 100644 --- a/apps/meteor/client/components/UserInfo/UserInfo.tsx +++ b/apps/meteor/client/components/UserInfo/UserInfo.tsx @@ -52,6 +52,7 @@ type UserInfoProps = UserInfoDataProps & { actions: ReactElement; roles: ReactElement[]; reason?: string; + invitationDate?: string; }; const UserInfo = ({ @@ -75,6 +76,7 @@ const UserInfo = ({ reason, freeSwitchExtension, abacAttributes, + invitationDate, ...props }: UserInfoProps): ReactElement => { const { t } = useTranslation(); @@ -207,6 +209,13 @@ const UserInfo = ({ ), )} + {invitationDate && ( + + {t('Invitation_date')} + {timeAgo(invitationDate)} + + )} + {createdAt && ( {t('Created_at')} diff --git a/apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersItem.tsx b/apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersItem.tsx index 52e84a3f04350..3953146428e54 100644 --- a/apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersItem.tsx +++ b/apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersItem.tsx @@ -37,12 +37,15 @@ const RoomMembersItem = ({ freeSwitchExtension, onClickView, rid, + subscription, reload, useRealName, subscription, }: RoomMembersItemProps): ReactElement => { const [showButton, setShowButton] = useState(); const isReduceMotionEnabled = usePrefersReducedMotion(); + const isInvited = subscription?.status === 'INVITED'; + const invitationDate = isInvited ? subscription?.ts : undefined; const handleMenuEvent = { [isReduceMotionEnabled ? 'onMouseEnter' : 'onTransitionEnd']: setShowButton, }; @@ -52,7 +55,14 @@ const RoomMembersItem = ({ const [nameOrUsername, displayUsername] = getUserDisplayNames(name, username, useRealName); return ( -