Fix expire timer
This commit is contained in:
parent
cf8ff24535
commit
669648d9cb
|
@ -1629,9 +1629,9 @@
|
|||
fromGroupUpdate: options.fromGroupUpdate,
|
||||
},
|
||||
});
|
||||
if (this.isPrivate()) {
|
||||
message.set({ destination: this.id });
|
||||
}
|
||||
|
||||
message.set({ destination: this.id });
|
||||
|
||||
if (message.isOutgoing()) {
|
||||
message.set({ recipients: this.getRecipients() });
|
||||
}
|
||||
|
|
|
@ -32,6 +32,10 @@ export class TimerNotification extends React.Component<Props> {
|
|||
? 'disabledDisappearingMessages'
|
||||
: 'theyChangedTheTimer';
|
||||
|
||||
const displayedPubkey = profileName
|
||||
? window.shortenPubkey(phoneNumber)
|
||||
: phoneNumber;
|
||||
|
||||
switch (type) {
|
||||
case 'fromOther':
|
||||
return (
|
||||
|
@ -42,9 +46,11 @@ export class TimerNotification extends React.Component<Props> {
|
|||
<ContactName
|
||||
i18n={i18n}
|
||||
key="external-1"
|
||||
phoneNumber={phoneNumber}
|
||||
phoneNumber={displayedPubkey}
|
||||
profileName={profileName}
|
||||
name={name}
|
||||
module="module-message__author"
|
||||
boldProfileName={true}
|
||||
/>,
|
||||
timespan,
|
||||
]}
|
||||
|
|
|
@ -32,14 +32,18 @@ export class ExpirationTimerUpdateMessage extends DataMessage {
|
|||
public dataProto(): SignalService.DataMessage {
|
||||
const data = new SignalService.DataMessage();
|
||||
|
||||
const groupMessage = new SignalService.GroupContext();
|
||||
data.flags = SignalService.DataMessage.Flags.EXPIRATION_TIMER_UPDATE;
|
||||
|
||||
if (this.groupId) {
|
||||
const groupMessage = new SignalService.GroupContext();
|
||||
groupMessage.id = new Uint8Array(
|
||||
StringUtils.encode(this.groupId.key, 'utf8')
|
||||
);
|
||||
groupMessage.type = SignalService.GroupContext.Type.DELIVER;
|
||||
|
||||
data.group = groupMessage;
|
||||
}
|
||||
data.flags = SignalService.DataMessage.Flags.EXPIRATION_TIMER_UPDATE;
|
||||
|
||||
if (this.expireTimer) {
|
||||
data.expireTimer = this.expireTimer;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue