[FIX] Set UserDefaults AppGroup on notification tap (#1047)

This commit is contained in:
Diego Mello 2019-07-12 10:44:31 -03:00 committed by GitHub
parent a0a109ec54
commit ba217ca5ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import database from '../lib/realm';
import RocketChat from '../lib/rocketchat';
import EventEmitter from '../utils/events';
import { appStart } from '../actions';
import { isIOS } from '../utils/deviceInfo';
const roomTypes = {
channel: 'c', direct: 'd', group: 'p'
@ -33,6 +34,10 @@ const handleOpen = function* handleOpen({ params }) {
return;
}
if (isIOS) {
yield RNUserDefaults.setName('group.ios.chat.rocket');
}
let { host } = params;
if (!/^(http|https)/.test(host)) {
host = `https://${ params.host }`;