Remove backbone as a dependency
Co-authored-by: Yash <yash@signal.org> Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> Co-authored-by: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com> Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
parent
4fc9793cae
commit
237e239e05
69 changed files with 963 additions and 2110 deletions
|
@ -2,7 +2,11 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { ValidateConversationType } from '../model-types.d';
|
||||
import { isDirectConversation } from './whatTypeOfConversation';
|
||||
import {
|
||||
isDirectConversation,
|
||||
isGroupV1,
|
||||
isGroupV2,
|
||||
} from './whatTypeOfConversation';
|
||||
import { isServiceIdString } from '../types/ServiceId';
|
||||
|
||||
export function validateConversation(
|
||||
|
@ -22,6 +26,14 @@ export function validateConversation(
|
|||
return error;
|
||||
}
|
||||
|
||||
if (
|
||||
!isDirectConversation(attributes) &&
|
||||
!isGroupV1(attributes) &&
|
||||
!isGroupV2(attributes)
|
||||
) {
|
||||
return 'Conversation is not direct, groupv1 or groupv2';
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue