Gift Badges: A few tweaks
This commit is contained in:
parent
0a0b5a7bfe
commit
a114e4e210
11 changed files with 134 additions and 124 deletions
5
ts/textsecure/Types.d.ts
vendored
5
ts/textsecure/Types.d.ts
vendored
|
@ -189,9 +189,10 @@ export type ProcessedGroupCallUpdate = Proto.DataMessage.IGroupCallUpdate;
|
|||
export type ProcessedStoryContext = Proto.DataMessage.IStoryContext;
|
||||
|
||||
export type ProcessedGiftBadge = {
|
||||
receiptCredentialPresentation: string;
|
||||
level: number;
|
||||
expiration: number;
|
||||
id: string | undefined;
|
||||
level: number;
|
||||
receiptCredentialPresentation: string;
|
||||
state: GiftBadgeStates;
|
||||
};
|
||||
|
||||
|
|
|
@ -249,6 +249,7 @@ export function processGiftBadge(
|
|||
|
||||
return {
|
||||
expiration: timestamp + Number(receipt.getReceiptExpirationTime()),
|
||||
id: undefined,
|
||||
level: Number(receipt.getReceiptLevel()),
|
||||
receiptCredentialPresentation: Bytes.toBase64(
|
||||
giftBadge.receiptCredentialPresentation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue