[js][ios][messaging] fixed misc messaging .send() types
This commit is contained in:
parent
30e9d82732
commit
343710dbf9
|
@ -410,9 +410,9 @@ RCT_EXPORT_METHOD(getBadgeNumber: (RCTPromiseResolveBlock)resolve rejecter:(RCTP
|
|||
|
||||
RCT_EXPORT_METHOD(send:(NSDictionary *)remoteMessage) {
|
||||
int64_t ttl = @([[remoteMessage valueForKey:@"ttl"] intValue]).doubleValue;
|
||||
NSString * mId = [[remoteMessage valueForKey:@"id"] stringValue];
|
||||
NSString * receiver = [[remoteMessage valueForKey:@"senderId"] stringValue];
|
||||
NSDictionary * data = [[remoteMessage valueForKey:@"data"] dictionaryRepresentation];
|
||||
NSString * mId = [remoteMessage valueForKey:@"id"];
|
||||
NSString * receiver = [remoteMessage valueForKey:@"sender"];
|
||||
NSDictionary * data = [remoteMessage valueForKey:@"data"];
|
||||
[[FIRMessaging messaging]sendMessage:data to:receiver withMessageID:mId timeToLive:ttl];
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ export default class RemoteMessage {
|
|||
id: generatePushID(),
|
||||
ttl: 3600,
|
||||
// add the googleapis sender id part if not already added.
|
||||
sender: sender.includes('@') ? sender : `${sender}@gcm.googleapis.com`,
|
||||
sender: `${sender}`.includes('@') ? sender : `${sender}@gcm.googleapis.com`,
|
||||
type: 'remote',
|
||||
data: {},
|
||||
};
|
||||
|
@ -27,7 +27,7 @@ export default class RemoteMessage {
|
|||
* @param id
|
||||
*/
|
||||
setId(id: string): RemoteMessage {
|
||||
this.properties.id = id;
|
||||
this.properties.id = `${id}`;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ export default class RemoteMessage {
|
|||
* @returns {RemoteMessage}
|
||||
*/
|
||||
setType(type: string): RemoteMessage {
|
||||
this.properties.type = type;
|
||||
this.properties.type = `${type}`;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ export default class RemoteMessage {
|
|||
* @returns {RemoteMessage}
|
||||
*/
|
||||
setCollapseKey(key: string): RemoteMessage {
|
||||
this.properties.collapseKey = key;
|
||||
this.properties.collapseKey = `${key}`;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* @flow */
|
||||
import { NativeModules } from 'react-native';
|
||||
|
||||
import { ReferenceBase } from './../base';
|
||||
import { ReferenceBase } from '../base';
|
||||
import StorageTask, { UPLOAD_TASK, DOWNLOAD_TASK } from './task';
|
||||
import Storage from './';
|
||||
|
||||
|
@ -16,7 +16,7 @@ export default class StorageReference extends ReferenceBase {
|
|||
this.storage = storage;
|
||||
}
|
||||
|
||||
get fullPath() {
|
||||
get fullPath(): string {
|
||||
return this.path;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue