Update command strings
authorAjay Bura <32841439+ajbura@users.noreply.github.com>
Sun, 11 Sep 2022 02:57:59 +0000 (08:27 +0530)
committerAjay Bura <32841439+ajbura@users.noreply.github.com>
Sun, 11 Sep 2022 02:57:59 +0000 (08:27 +0530)
.github/workflows/docker-pr.yml
src/app/organisms/profile-editor/ProfileEditor.jsx
src/app/organisms/room/commands.jsx

index 1e7a71f3b1563f8fcf5afdd35f14b8b0adcc5fcc..922e0c0ec3f25ddd0b8722c857286a5ed7742dcd 100644 (file)
@@ -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
index 5085bfb99c73e2ad665490aa6443039940cd9263..bb7359da310d2957ac5f8669bed5873093303c86 100644 (file)
@@ -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 = () => (
     <div className="profile-editor__info" style={{ marginBottom: avatarSrc ? '24px' : '0' }}>
       <div>
-        <Text variant="h2" primary weight="medium">{twemojify(username) ?? fallbackUsername}</Text>
+        <Text variant="h2" primary weight="medium">{twemojify(username) ?? userId}</Text>
         <IconButton
           src={PencilIC}
           size="extra-small"
@@ -111,7 +110,7 @@ function ProfileEditor({ userId }) {
   return (
     <div className="profile-editor">
       <ImageUpload
-        text={username ?? fallbackUsername}
+        text={username ?? userId}
         bgColor={colorMXID(userId)}
         imageSrc={avatarSrc}
         onUpload={handleAvatarUpload}
index 410fd741f5eb14a2f650990f2ab231f89b44b7b1..cceaf045acfcbe83b3235048f67f57203e84230a 100644 (file)
@@ -57,7 +57,7 @@ const commands = {
   },
   startdm: {
     name: 'startdm',
-    description: 'Start DM with user. Example: /startdm userId1 userId2',
+    description: 'Start direct message with user. Example: /startdm userId1',
     exe: async (roomId, data) => {
       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);