This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"category": "group_channel:message_send", | |
"custom_type": "", | |
"mention_type": "users", | |
"mentioned_users": [], | |
"app_id": "-", | |
"members": [ | |
{ | |
"unread_message_count": 234, | |
"total_unread_message_count": 234, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "webhooks", | |
"version": "1.0.0", | |
"description": "", | |
"main": "server.js", | |
"scripts": { | |
"start": "nodemon server.js" | |
}, | |
"keywords": [], | |
"author": "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
createMessageItem(message, isCurrentUser, isContinue, unreadCount) { | |
var messageSet = this.createDiv(); | |
messageSet.id = message.messageId; | |
this._setClass(messageSet, isCurrentUser ? [className.MESSAGE_SET, className.USER] : [className.MESSAGE_SET]); | |
if (isContinue) { | |
messageSet.style.cssText += `margin-top: ${MARGIN_TOP_MESSAGE}`; | |
} | |
var senderImg = this.createDiv(); | |
this._setClass(senderImg, [className.IMAGE]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @format | |
*/ | |
import {AppRegistry, Platform} from 'react-native'; | |
import messaging from '@react-native-firebase/messaging'; | |
import App from './App'; | |
import {name as appName} from './app.json'; | |
import { onRemoteMessage } from './src/utils'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @format | |
*/ | |
import {AppRegistry, Platform} from 'react-native'; | |
import messaging from '@react-native-firebase/messaging'; | |
import App from './App'; | |
import {name as appName} from './app.json'; | |
import { onRemoteMessage } from './src/utils'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useEffect(() => { | |
AsyncStorage.getItem(savedUserKey) | |
.then(async user => { | |
try { | |
if (user) { | |
const authorizationStatus = await messaging().requestPermission(); | |
if ( | |
authorizationStatus === messaging.AuthorizationStatus.AUTHORIZED || | |
authorizationStatus === messaging.AuthorizationStatus.PROVISIONAL | |
) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return ( | |
<NavigationContainer> | |
<AppContext.Provider value={initialState}> | |
<Stack.Navigator> | |
<Stack.Screen name="Lobby" component={Lobby} options={{ ...defaultHeaderOptions }} /> | |
<Stack.Screen name="Chat" component={Chat} options={{ ...defaultHeaderOptions }} /> | |
<Stack.Screen name="Member" component={Member} options={{ ...defaultHeaderOptions }} /> | |
<Stack.Screen name="Invite" component={Invite} options={{ ...defaultHeaderOptions }} /> | |
<Stack.Screen name="Profile" component={Profile} options={{ ...defaultHeaderOptions }} /> | |
</Stack.Navigator> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useEffect(() => { | |
AsyncStorage.getItem(savedUserKey) | |
.then(user => { | |
if (user) { | |
setCurrentUser(JSON.parse(user)); | |
} | |
setInitialized(true); | |
return handleNotificationAction(navigation, sendbird, currentUser, 'lobby'); | |
}) | |
.catch(err => console.error(err)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return ( | |
<> | |
{initialized ? ( | |
currentUser ? ( | |
<Channels {...props} currentUser={currentUser} /> | |
) : ( | |
<Login {...props} onLogin={login} /> | |
) | |
) : ( | |
<View /> |
OlderNewer