mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Change Phone Number notifications
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
import { TimelineItemType } from '../../components/conversation/TimelineItem';
|
||||
import { PropsData } from '../../components/conversation/Message';
|
||||
import { PropsData as TimerNotificationProps } from '../../components/conversation/TimerNotification';
|
||||
import { PropsData as ChangeNumberNotificationProps } from '../../components/conversation/ChangeNumberNotification';
|
||||
import { PropsData as SafetyNumberNotificationProps } from '../../components/conversation/SafetyNumberNotification';
|
||||
import { PropsData as VerificationNotificationProps } from '../../components/conversation/VerificationNotification';
|
||||
import { PropsDataType as GroupsV2Props } from '../../components/conversation/GroupV2Change';
|
||||
@@ -188,6 +189,12 @@ export function getPropsForBubble(
|
||||
data: null,
|
||||
};
|
||||
}
|
||||
if (isChangeNumberNotification(message)) {
|
||||
return {
|
||||
type: 'changeNumberNotification',
|
||||
data: getPropsForChangeNumberNotification(message, conversationSelector),
|
||||
};
|
||||
}
|
||||
if (isChatSessionRefreshed(message)) {
|
||||
return {
|
||||
type: 'chatSessionRefreshed',
|
||||
@@ -852,6 +859,24 @@ export function isUniversalTimerNotification(
|
||||
return message.type === 'universal-timer-notification';
|
||||
}
|
||||
|
||||
// Change Number Notification
|
||||
|
||||
export function isChangeNumberNotification(
|
||||
message: MessageAttributesType
|
||||
): boolean {
|
||||
return message.type === 'change-number-notification';
|
||||
}
|
||||
|
||||
function getPropsForChangeNumberNotification(
|
||||
message: MessageAttributesType,
|
||||
conversationSelector: GetConversationByIdType
|
||||
): ChangeNumberNotificationProps {
|
||||
return {
|
||||
sender: conversationSelector(message.sourceUuid),
|
||||
timestamp: message.sent_at,
|
||||
};
|
||||
}
|
||||
|
||||
// Chat Session Refreshed
|
||||
|
||||
export function isChatSessionRefreshed(
|
||||
|
||||
Reference in New Issue
Block a user