mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-18 07:36:00 +01:00
Update backup export behavior for member labels and group updates
This commit is contained in:
@@ -1348,8 +1348,12 @@ export class BackupExportStream extends Readable {
|
|||||||
members: convo.membersV2?.map(member => {
|
members: convo.membersV2?.map(member => {
|
||||||
return {
|
return {
|
||||||
joinedAtVersion: member.joinedAtVersion,
|
joinedAtVersion: member.joinedAtVersion,
|
||||||
|
...(member.labelString
|
||||||
|
? {
|
||||||
labelEmoji: member.labelEmoji,
|
labelEmoji: member.labelEmoji,
|
||||||
labelString: member.labelString,
|
labelString: member.labelString,
|
||||||
|
}
|
||||||
|
: undefined),
|
||||||
role: member.role,
|
role: member.role,
|
||||||
userId: this.#aciToBytes(member.aci),
|
userId: this.#aciToBytes(member.aci),
|
||||||
};
|
};
|
||||||
@@ -1452,8 +1456,7 @@ export class BackupExportStream extends Readable {
|
|||||||
const isOutgoing = message.type === 'outgoing';
|
const isOutgoing = message.type === 'outgoing';
|
||||||
const isIncoming = message.type === 'incoming';
|
const isIncoming = message.type === 'incoming';
|
||||||
|
|
||||||
// Pacify typescript
|
if (message.sourceServiceId && isAciString(message.sourceServiceId)) {
|
||||||
if (message.sourceServiceId) {
|
|
||||||
authorId = this.#getOrPushPrivateRecipient({
|
authorId = this.#getOrPushPrivateRecipient({
|
||||||
serviceId: message.sourceServiceId,
|
serviceId: message.sourceServiceId,
|
||||||
e164: message.source,
|
e164: message.source,
|
||||||
@@ -2003,6 +2006,8 @@ export class BackupExportStream extends Readable {
|
|||||||
|
|
||||||
if (isGroupV2Change(message)) {
|
if (isGroupV2Change(message)) {
|
||||||
updateMessage.groupChange = await this.toGroupV2Update(message, options);
|
updateMessage.groupChange = await this.toGroupV2Update(message, options);
|
||||||
|
strictAssert(this.#ourConversation?.id, 'our conversation must exist');
|
||||||
|
patch.authorId = this.#getOrPushPrivateRecipient(this.#ourConversation);
|
||||||
return { kind: NonBubbleResultKind.Directionless, patch };
|
return { kind: NonBubbleResultKind.Directionless, patch };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -750,7 +750,7 @@ export class BackupsService {
|
|||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.warn(
|
log.warn(
|
||||||
'internal validation: failed with errors',
|
'internal validation: failed with errors\n',
|
||||||
Errors.toLogFormat(error)
|
Errors.toLogFormat(error)
|
||||||
);
|
);
|
||||||
return { error: Errors.toLogFormat(error) };
|
return { error: Errors.toLogFormat(error) };
|
||||||
|
|||||||
Reference in New Issue
Block a user