Appease the linter

pull/21833/head
Travis Ralston 2020-01-13 13:28:33 -07:00
parent 5fd27a10bb
commit bf6798e109
5 changed files with 10 additions and 10 deletions

View File

@ -20,6 +20,7 @@ import DMRoomMap from './utils/DMRoomMap';
import {getHttpUriForMxc} from "matrix-js-sdk/src/content-repo";
export function avatarUrlForMember(member, width, height, resizeMethod) {
let url;
if (member && member.getAvatarUrl) {
url = member.getAvatarUrl(
MatrixClientPeg.get().getHomeserverUrl(),
@ -34,7 +35,7 @@ export function avatarUrlForMember(member, width, height, resizeMethod) {
// member can be null here currently since on invites, the JS SDK
// does not have enough info to build a RoomMember object for
// the inviter.
url = this.defaultAvatarUrlForString(member ? member.userId : '');
url = defaultAvatarUrlForString(member ? member.userId : '');
}
return url;
}

View File

@ -21,29 +21,29 @@ import { EventStatus } from 'matrix-js-sdk';
export default class Resend {
static resendUnsentEvents(room) {
room.getPendingEvents().filter(function (ev) {
room.getPendingEvents().filter(function(ev) {
return ev.status === EventStatus.NOT_SENT;
}).forEach(function (event) {
}).forEach(function(event) {
Resend.resend(event);
});
}
static cancelUnsentEvents(room) {
room.getPendingEvents().filter(function (ev) {
room.getPendingEvents().filter(function(ev) {
return ev.status === EventStatus.NOT_SENT;
}).forEach(function (event) {
}).forEach(function(event) {
Resend.removeFromQueue(event);
});
}
static resend(event) {
const room = MatrixClientPeg.get().getRoom(event.getRoomId());
MatrixClientPeg.get().resendEvent(event, room).then(function (res) {
MatrixClientPeg.get().resendEvent(event, room).then(function(res) {
dis.dispatch({
action: 'message_sent',
event: event,
});
}, function (err) {
}, function(err) {
// XXX: temporary logging to try to diagnose
// https://github.com/vector-im/riot-web/issues/3148
console.log('Resend got send failure: ' + err.name + '(' + err + ')');

View File

@ -1136,8 +1136,6 @@ const TimelinePanel = createReactClass({
const messagePanel = this._messagePanel.current;
if (messagePanel === undefined) return null;
const EventTile = sdk.getComponent('rooms.EventTile');
const wrapperRect = ReactDOM.findDOMNode(messagePanel).getBoundingClientRect();
const myUserId = MatrixClientPeg.get().credentials.userId;

View File

@ -24,6 +24,7 @@ import { _t } from '../../../languageHandler';
import Field from "../elements/Field";
import ErrorDialog from "../dialogs/ErrorDialog";
import AccessibleButton from "../elements/AccessibleButton";
import Modal from "../../../Modal";
class EditableAliasesList extends EditableItemList {
constructor(props) {

View File

@ -17,4 +17,4 @@ export default function(opts) {
}
return createReactClass(opts);
};
}