-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add user context to invite preview screen #30654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
} | ||
|
||
function useGetUserSafety(inviterMember: RoomMember | null): { | ||
score: InviteScore | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unused now since we don't have a headline score.
setIsLocalTrustedServer(false); | ||
} | ||
|
||
(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might need to remove this, it was rather flaky.
); | ||
} | ||
|
||
function useGetUserSafety(inviterMember: RoomMember | null): { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be useful to factor this out, we might use it in other parts of the UI.
} | ||
|
||
const { roomCount, joinedTo, userBanned, userKicked, userFirstSeen, isLocalTrustedServer } = details; | ||
return ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaaaaaaaaaaall of this needs i18n-ing
Unsafe = "unsafe", | ||
} | ||
|
||
function SafetyDetailItem({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially a candidate for Compound-ing, will check with design.
(async () => { | ||
let rooms: string[]; | ||
try { | ||
rooms = await client._unstable_getSharedRooms(inviterMember.userId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not actually be useful if we already have a store of rooms locally.
Fixes #19620
For element-hq/element-meta#1366
This adds some additional context to the invite preview screen in Element so that you can roughly figure out how much you trust an invite from another person. This is another tool for users to feel safer on Matrix by having instant context to how they might relate to another user.
This does not currently rely on any third party services to provide context, all the information is taken from clientside held events. This means we don't always have a complete picture of a user's activities, but it neither leaks any information to you or to the server.
This has gone through light review with @element-hq/trust-safety but needs both product review
and design reviewto really progress.Design docs: https://www.figma.com/design/OK9VOhqfATe9eLdhV8qaZC/User-Context-on-Invite-Preview?node-id=1-632&p=f&t=7NqTf2JSEyPC4yrJ-0
Screenshot
Checklist
public
/exported
symbols have accurate TSDoc documentation.