Remove deprecated ContactDetails fields
This commit is contained in:
parent
a03e064977
commit
e8fdd7116b
2 changed files with 5 additions and 22 deletions
|
@ -689,10 +689,10 @@ message ContactDetails {
|
|||
optional string aci = 9;
|
||||
optional string name = 2;
|
||||
optional Avatar avatar = 3;
|
||||
optional string color = 4;
|
||||
optional Verified verified = 5;
|
||||
optional bytes profileKey = 6;
|
||||
optional bool blocked = 7;
|
||||
// reserved 4; // formerly color
|
||||
// reserved 5; // formerly verified
|
||||
// reserved 6; // formerly profileKey
|
||||
// reserved 7; // formerly blocked
|
||||
optional uint32 expireTimer = 8;
|
||||
optional uint32 inboxPosition = 10;
|
||||
}
|
||||
|
|
|
@ -197,24 +197,8 @@ function prepareContact(
|
|||
? DurationInSeconds.fromSeconds(proto.expireTimer)
|
||||
: undefined;
|
||||
|
||||
const verified =
|
||||
proto.verified && proto.verified.destinationAci
|
||||
? {
|
||||
...proto.verified,
|
||||
|
||||
destinationAci: normalizeAci(
|
||||
proto.verified.destinationAci,
|
||||
'ContactBuffer.verified.destinationAci'
|
||||
),
|
||||
}
|
||||
: proto.verified;
|
||||
|
||||
// We reject incoming contacts with invalid aci information
|
||||
if (
|
||||
(proto.aci && !isAciString(proto.aci)) ||
|
||||
(proto.verified?.destinationAci &&
|
||||
!isAciString(proto.verified.destinationAci))
|
||||
) {
|
||||
if (proto.aci && !isAciString(proto.aci)) {
|
||||
log.warn('ParseContactsTransform: Dropping contact with invalid aci');
|
||||
|
||||
return undefined;
|
||||
|
@ -224,7 +208,6 @@ function prepareContact(
|
|||
...proto,
|
||||
expireTimer,
|
||||
aci,
|
||||
verified,
|
||||
avatar,
|
||||
number: dropNull(proto.number),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue