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 aci = 9;
|
||||||
optional string name = 2;
|
optional string name = 2;
|
||||||
optional Avatar avatar = 3;
|
optional Avatar avatar = 3;
|
||||||
optional string color = 4;
|
// reserved 4; // formerly color
|
||||||
optional Verified verified = 5;
|
// reserved 5; // formerly verified
|
||||||
optional bytes profileKey = 6;
|
// reserved 6; // formerly profileKey
|
||||||
optional bool blocked = 7;
|
// reserved 7; // formerly blocked
|
||||||
optional uint32 expireTimer = 8;
|
optional uint32 expireTimer = 8;
|
||||||
optional uint32 inboxPosition = 10;
|
optional uint32 inboxPosition = 10;
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,24 +197,8 @@ function prepareContact(
|
||||||
? DurationInSeconds.fromSeconds(proto.expireTimer)
|
? DurationInSeconds.fromSeconds(proto.expireTimer)
|
||||||
: undefined;
|
: 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
|
// We reject incoming contacts with invalid aci information
|
||||||
if (
|
if (proto.aci && !isAciString(proto.aci)) {
|
||||||
(proto.aci && !isAciString(proto.aci)) ||
|
|
||||||
(proto.verified?.destinationAci &&
|
|
||||||
!isAciString(proto.verified.destinationAci))
|
|
||||||
) {
|
|
||||||
log.warn('ParseContactsTransform: Dropping contact with invalid aci');
|
log.warn('ParseContactsTransform: Dropping contact with invalid aci');
|
||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
|
@ -224,7 +208,6 @@ function prepareContact(
|
||||||
...proto,
|
...proto,
|
||||||
expireTimer,
|
expireTimer,
|
||||||
aci,
|
aci,
|
||||||
verified,
|
|
||||||
avatar,
|
avatar,
|
||||||
number: dropNull(proto.number),
|
number: dropNull(proto.number),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue