Calling support

This commit is contained in:
Peter Thatcher 2020-06-04 11:16:19 -07:00 committed by Scott Nonnenberg
parent 83574eb067
commit d3a27a6442
72 changed files with 3864 additions and 191 deletions

View file

@ -367,12 +367,27 @@
storage.put('notification-setting', value),
getAudioNotification: () => storage.get('audio-notification'),
setAudioNotification: value => storage.put('audio-notification', value),
getCallRingtoneNotification: () =>
storage.get('call-ringtone-notification', true),
setCallRingtoneNotification: value =>
storage.put('call-ringtone-notification', value),
getCallSystemNotification: () =>
storage.get('call-system-notification', true),
setCallSystemNotification: value =>
storage.put('call-system-notification', value),
getIncomingCallNotification: () =>
storage.get('incoming-call-notification', true),
setIncomingCallNotification: value =>
storage.put('incoming-call-notification', value),
getSpellCheck: () => storage.get('spell-check', true),
setSpellCheck: value => {
storage.put('spell-check', value);
},
getAlwaysRelayCalls: () => storage.get('always-relay-calls'),
setAlwaysRelayCalls: value => storage.put('always-relay-calls', value),
// eslint-disable-next-line eqeqeq
isPrimary: () => textsecure.storage.user.getDeviceId() == '1',
getSyncRequest: () =>
@ -586,6 +601,7 @@
window.reduxActions.updates,
window.Whisper.events
);
window.Signal.Services.calling.initialize(window.reduxActions.calling);
window.reduxActions.expiration.hydrateExpirationStatus(
window.Signal.Util.hasExpired()
);
@ -638,6 +654,10 @@
// Binding these actions to our redux store and exposing them allows us to update
// redux when things change in the backbone world.
actions.calling = Signal.State.bindActionCreators(
Signal.State.Ducks.calling.actions,
store.dispatch
);
actions.conversations = Signal.State.bindActionCreators(
Signal.State.Ducks.conversations.actions,
store.dispatch