From 29ddcfa1f9ca253c50286126ae42d261f1ca29fc Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Sun, 11 Sep 2022 08:27:59 +0530 Subject: [PATCH] Update command strings --- .github/workflows/docker-pr.yml | 2 -- src/app/organisms/profile-editor/ProfileEditor.jsx | 5 ++--- src/app/organisms/room/commands.jsx | 8 ++++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-pr.yml b/.github/workflows/docker-pr.yml index 1e7a71f..922e0c0 100644 --- a/.github/workflows/docker-pr.yml +++ b/.github/workflows/docker-pr.yml @@ -9,8 +9,6 @@ on: jobs: docker-build: runs-on: ubuntu-latest - env: - PR_NUMBER: ${{github.event.number}} steps: - name: Checkout repository uses: actions/checkout@v3.0.2 diff --git a/src/app/organisms/profile-editor/ProfileEditor.jsx b/src/app/organisms/profile-editor/ProfileEditor.jsx index 5085bfb..bb7359d 100644 --- a/src/app/organisms/profile-editor/ProfileEditor.jsx +++ b/src/app/organisms/profile-editor/ProfileEditor.jsx @@ -20,7 +20,6 @@ function ProfileEditor({ userId }) { const [isEditing, setIsEditing] = useState(false); const mx = initMatrix.matrixClient; const user = mx.getUser(mx.getUserId()); - const fallbackUsername = userId.match(/^@?(\S+):(\S+)$/)[1]; const displayNameRef = useRef(null); const [avatarSrc, setAvatarSrc] = useState(user.avatarUrl ? mx.mxcUrlToHttp(user.avatarUrl, 80, 80, 'crop') : null); @@ -96,7 +95,7 @@ function ProfileEditor({ userId }) { const renderInfo = () => (
- {twemojify(username) ?? fallbackUsername} + {twemojify(username) ?? userId} { const mx = initMatrix.matrixClient; const rawIds = data.split(' '); @@ -78,7 +78,7 @@ const commands = { }, join: { name: 'join', - description: 'Join room with alias. Example: /join alias1 alias2', + description: 'Join room with address. Example: /join address1 address2', exe: (roomId, data) => { const rawIds = data.split(' '); const roomIds = rawIds.filter((id) => id.match(ROOM_ID_ALIAS_REG)); @@ -159,7 +159,7 @@ const commands = { }, myroomnick: { name: 'myroomnick', - description: 'Change my room nick', + description: 'Change nick in current room.', exe: (roomId, data) => { const nick = data.trim(); if (nick === '') return; @@ -168,7 +168,7 @@ const commands = { }, myroomavatar: { name: 'myroomavatar', - description: 'Change my room avatar. Example /myroomavatar mxc://xyzabc', + description: 'Change profile picture in current room. Example /myroomavatar mxc://xyzabc', exe: (roomId, data) => { if (data.match(MXC_REG)) { roomActions.setMyRoomAvatar(roomId, data);