code: function(event, state, member) {
          if (member.membership === "invite") {
              // We do NOT add invited members because people love to typo user IDs
              // which would then show up in these lists (!)
              return;
          }
  
          const user = this.users[member.userId] || new User(member.userId);
          if (member.name) {
              user.setDisplayName(member.name);
              if (member.events.member) {
                  user.setRawDisplayName(
                      member.events.member.getDirectionalContent().displayname,
                  );
              }
          }
          if (member.events.member && member.events.member.getContent().avatar_url) {
              user.setAvatarUrl(member.events.member.getContent().avatar_url);
          }
          this.users[user.userId] = user;
      }
docs: Called when a room member in a room being tracked by this store has been
  updated.
  @param {MatrixEvent} event
  @param {RoomState} state
  @param {RoomMember} member