Fixing linting errors.

This commit is contained in:
warrickct 2022-02-22 12:41:15 +11:00
parent 2957c131c0
commit 2258c6da4c
5 changed files with 8 additions and 12 deletions

View File

@ -32,6 +32,7 @@ export const ConversationMessageRequestButtons = () => {
}
}
}
// tslint:disable-next-line: no-floating-promises
getIncomingMessages();
});
@ -68,7 +69,7 @@ export const ConversationMessageRequestButtons = () => {
const handleAcceptConversationRequest = async () => {
const { id } = selectedConversation;
const convo = await getConversationController().get(selectedConversation.id);
const convo = getConversationController().get(selectedConversation.id);
await convo.setDidApproveMe(true);
await approveConvoAndSendResponse(id, true);
};

View File

@ -25,6 +25,7 @@ export const ConversationRequestinfo = () => {
}
}
}
// tslint:disable-next-line: no-floating-promises
getIncomingMessages();
});

View File

@ -33,7 +33,7 @@ async function handleBlockAllRequestsClick(convoRequests: Array<ReduxConversatio
const convoModel = convoController.get(id);
if (!convoModel.isBlocked()) {
await BlockedNumberController.block(id);
convoModel.commit();
await convoModel.commit();
}
await convoModel.setIsApproved(false);

View File

@ -766,7 +766,6 @@ export async function getUnreadCountByConversation(conversationId: string): Prom
* Gets the count of messages for a direction
* @param conversationId Conversation for messages to retrieve from
* @param type outgoing/incoming
* @returns
*/
export async function getMessageCountByType(
conversationId: string,

View File

@ -12,14 +12,14 @@ import { MessageModel } from './message';
import { MessageAttributesOptionals, MessageDirection } from './messageType';
import autoBind from 'auto-bind';
import {
getMessageCountByType,
getLastMessagesByConversation,
getMessageCountByType,
getMessagesByConversation,
getUnreadByConversation,
getUnreadCountByConversation,
removeMessage as dataRemoveMessage,
saveMessages,
updateConversation,
getMessagesByConversation,
} from '../../ts/data/data';
import { toHex } from '../session/utils/String';
import {
@ -638,11 +638,6 @@ export class ConversationModel extends Backbone.Model<ConversationAttributes> {
}
}
if (uploads.body?.includes('unapprove')) {
this.setIsApproved(false);
this.setDidApproveMe(false);
}
if (this.isOpenGroupV2()) {
const chatMessageOpenGroupV2 = new OpenGroupVisibleMessage(chatMessageParams);
const roomInfos = this.toOpenGroupV2();
@ -949,7 +944,7 @@ export class ConversationModel extends Backbone.Model<ConversationAttributes> {
) {
// if there's a message by the other user, they've replied to us which we consider an accepted convo
if (!this.didApproveMe() && this.isPrivate()) {
this.setDidApproveMe(true);
await this.setDidApproveMe(true);
}
return this.addSingleMessage({
@ -1396,7 +1391,7 @@ export class ConversationModel extends Backbone.Model<ConversationAttributes> {
);
}).length === 1;
const isFirstMessageOfConvo =
(await (await getMessagesByConversation(this.id, { messageId: null })).length) === 1;
(await getMessagesByConversation(this.id, { messageId: null })).length === 1;
if (hadNoRequestsPrior && isFirstMessageOfConvo) {
friendRequestText = window.i18n('youHaveANewFriendRequest');
} else {