Fixing linting errors
This commit is contained in:
parent
62945a2910
commit
0db3c76756
|
@ -17,7 +17,7 @@ export const ConversationMessageRequestButtons = (props: {
|
|||
const { isApproved, type } = selectedConversation;
|
||||
const showMsgRequestUI = !isApproved && type === 'private';
|
||||
|
||||
const handleDeclineConversationRequest = async () => {
|
||||
const handleDeclineConversationRequest = () => {
|
||||
window.inboxStore?.dispatch(
|
||||
updateConfirmModal({
|
||||
okText: window.i18n('decline'),
|
||||
|
|
|
@ -131,11 +131,10 @@ export const acceptConversation = async (conversationId: string, syncToDevices:
|
|||
return;
|
||||
}
|
||||
|
||||
Promise.all([
|
||||
await convoToApprove.setIsApproved(true, false),
|
||||
await convoToApprove.setDidApproveMe(true, false),
|
||||
]);
|
||||
convoToApprove.commit();
|
||||
await convoToApprove.setIsApproved(true, false);
|
||||
await convoToApprove.setDidApproveMe(true, false);
|
||||
|
||||
await convoToApprove.commit();
|
||||
await convoToApprove.sendMessageRequestResponse(true);
|
||||
|
||||
// Conversation was not approved before so a sync is needed
|
||||
|
|
|
@ -147,7 +147,7 @@ const handleContactReceived = async (
|
|||
if (contactReceived.didApproveMe) {
|
||||
// TODO: add message search in convo for pre-existing msgRequestResponse msg only happens once per convo
|
||||
// if source of the sync matches conversationId
|
||||
contactConvo.addSingleMessage({
|
||||
await contactConvo.addSingleMessage({
|
||||
conversationId: contactConvo.get('id'),
|
||||
source: envelope.source,
|
||||
type: 'outgoing', // mark it as outgoing just so it appears below our sent attachment
|
||||
|
|
|
@ -303,7 +303,7 @@ function shouldDropBlockedUserMessage(content: SignalService.Content): boolean {
|
|||
// first check that dataMessage is the only field set in the Content
|
||||
let msgWithoutDataMessage = Lodash.pickBy(
|
||||
content,
|
||||
(_, key) => key !== 'dataMessage' && key !== 'toJSON'
|
||||
(_value, key) => key !== 'dataMessage' && key !== 'toJSON'
|
||||
);
|
||||
msgWithoutDataMessage = Lodash.pickBy(msgWithoutDataMessage, Lodash.identity);
|
||||
|
||||
|
@ -322,6 +322,7 @@ function shouldDropBlockedUserMessage(content: SignalService.Content): boolean {
|
|||
return !isControlDataMessageOnly;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line: cyclomatic-complexity
|
||||
export async function innerHandleSwarmContentMessage(
|
||||
envelope: EnvelopePlus,
|
||||
plaintext: ArrayBuffer,
|
||||
|
@ -386,9 +387,9 @@ export async function innerHandleSwarmContentMessage(
|
|||
|
||||
// For edge case when messaging a client that's unable to explicitly send request approvals
|
||||
if (!convo.didApproveMe() && convo.isPrivate() && convo.isApproved()) {
|
||||
convo.setDidApproveMe(true);
|
||||
await convo.setDidApproveMe(true);
|
||||
// Conversation was not approved before so a sync is needed
|
||||
convo.addSingleMessage({
|
||||
await convo.addSingleMessage({
|
||||
conversationId: convo.get('id'),
|
||||
source: envelope.source,
|
||||
type: 'outgoing', // mark it as outgoing just so it appears below our sent attachment
|
||||
|
@ -609,7 +610,7 @@ async function handleMessageRequestResponse(
|
|||
await conversationToApprove.setDidApproveMe(isApproved);
|
||||
if (isApproved === true) {
|
||||
// Conversation was not approved before so a sync is needed
|
||||
conversationToApprove.addSingleMessage({
|
||||
await conversationToApprove.addSingleMessage({
|
||||
conversationId: conversationToApprove.get('id'),
|
||||
source: envelope.source,
|
||||
type: 'outgoing', // mark it as outgoing just so it appears below our sent attachment
|
||||
|
|
|
@ -104,7 +104,7 @@ export class ConfigurationMessageContact {
|
|||
profileKey,
|
||||
isApproved,
|
||||
isBlocked,
|
||||
didApproveMe
|
||||
didApproveMe,
|
||||
}: {
|
||||
publicKey: string;
|
||||
displayName: string;
|
||||
|
@ -145,7 +145,7 @@ export class ConfigurationMessageContact {
|
|||
profileKey: this.profileKey,
|
||||
isApproved: this.isApproved,
|
||||
isBlocked: this.isBlocked,
|
||||
didApproveMe: this.didApproveMe
|
||||
didApproveMe: this.didApproveMe,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ export class MockConversation {
|
|||
isTrustedForAttachmentDownload: false,
|
||||
isPinned: false,
|
||||
isApproved: false,
|
||||
didApproveMe: false,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue