mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-01-31 01:39:08 +01:00
invites: show server from inviter
Some servers are particularly prone to spam users, this helps identifying spam invites early on.
This commit is contained in:
parent
c110e64341
commit
4fbf30d3fe
1 changed files with 13 additions and 1 deletions
|
@ -32,7 +32,12 @@ import {
|
|||
} from '../../../utils/room';
|
||||
import { nameInitials } from '../../../utils/common';
|
||||
import { RoomAvatar } from '../../../components/room-avatar';
|
||||
import { addRoomIdToMDirect, getMxIdLocalPart, guessDmRoomUserId } from '../../../utils/matrix';
|
||||
import {
|
||||
addRoomIdToMDirect,
|
||||
getMxIdLocalPart,
|
||||
getMxIdServer,
|
||||
guessDmRoomUserId,
|
||||
} from '../../../utils/matrix';
|
||||
import { Time } from '../../../components/message';
|
||||
import { useElementSizeObserver } from '../../../hooks/useElementSizeObserver';
|
||||
import { onEnterOrSpace, stopPropagation } from '../../../utils/keyboard';
|
||||
|
@ -64,6 +69,7 @@ function InviteCard({ room, userId, direct, compact, onNavigate }: InviteCardPro
|
|||
const senderName = senderId
|
||||
? getMemberDisplayName(room, senderId) ?? getMxIdLocalPart(senderId) ?? senderId
|
||||
: undefined;
|
||||
const serverName = senderId ? getMxIdServer(senderId) : undefined;
|
||||
|
||||
const topic = useRoomTopic(room);
|
||||
|
||||
|
@ -102,6 +108,12 @@ function InviteCard({ room, userId, direct, compact, onNavigate }: InviteCardPro
|
|||
<Box grow="Yes">
|
||||
<Text size="T200" priority="300" truncate>
|
||||
Invited by <b>{senderName}</b>
|
||||
{serverName && (
|
||||
<>
|
||||
{' on '}
|
||||
<b>{serverName}</b>
|
||||
</>
|
||||
)}
|
||||
</Text>
|
||||
</Box>
|
||||
<Box shrink="No">
|
||||
|
|
Loading…
Reference in a new issue