mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 14:38:46 +00:00
fix(resources/messages): fix coercion comparsion
This commit is contained in:
1 parent
ea69ba4667
commit
b92cf0d6fa
3 files changed
+5
-4
No files matched your search
@@ -85,6 +85,7 @@ RegisterCommand(
|
||||
async () => {
|
||||
await hidePhone();
|
||||
sendMessage('PHONE', 'phoneRestart', {});
|
||||
fetchOnInitialize();
|
||||
},
|
||||
false,
|
||||
);
|
||||
|
||||
@@ -93,7 +93,7 @@ export class _MessagesDB {
|
||||
const messages = <Message[]>results;
|
||||
return messages.map((message) => ({
|
||||
...message,
|
||||
isMine: message.user_identifier === userIdentifier,
|
||||
isMine: message.user_identifier == userIdentifier,
|
||||
updatedAt: message.updatedAt.toString(),
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export async function getConsolidatedMessageGroups(
|
||||
(mapping: MessageGroupMapping, messageGroup: UnformattedMessageGroup) => {
|
||||
const groupId = messageGroup.group_id;
|
||||
const displayTerm = messageGroup.display || messageGroup.phone_number || '???';
|
||||
const isUser = messageGroup.participant_identifier === userIdentifier;
|
||||
const isUser = messageGroup.participant_identifier == userIdentifier;
|
||||
// Is already mapped?
|
||||
if (groupId in mapping) {
|
||||
// Add participant phone number
|
||||
@@ -77,7 +77,7 @@ export async function getGroupIds(
|
||||
): Promise<string[]> {
|
||||
const groupIds: string[] = [];
|
||||
for (const groupId of Object.keys(groupMapping)) {
|
||||
const isMine = groupMapping[groupId].user_identifier === userIdentifier;
|
||||
const isMine = groupMapping[groupId].user_identifier == userIdentifier;
|
||||
if (isMine || (await MessagesDB.getMessageCountByGroup(groupId)) > 0) {
|
||||
groupIds.push(groupId);
|
||||
}
|
||||
@@ -163,7 +163,7 @@ export async function createMessageGroupsFromPhoneNumbers(
|
||||
}
|
||||
|
||||
// don't allow explicitly adding yourself
|
||||
if (identifiers.some((identifier) => identifier === userIdentifier)) {
|
||||
if (identifiers.some((identifier) => identifier == userIdentifier)) {
|
||||
return { error: true, mine: true, failedNumbers };
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user