mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
feat(resource): messageEvent for each app
This commit is contained in:
1 parent
4045acc162
commit
5c9f36f754
2 files changed
+16
-1
No files matched your search
@@ -2,4 +2,7 @@ export default {
|
||||
TWITTER: 'TWITTER',
|
||||
MESSAGES: 'MESSAGES',
|
||||
NOTES: 'NOTES',
|
||||
MARKETPLACE: 'SELLOUT',
|
||||
CONTACTS: 'CONTACTS',
|
||||
CAMERA: 'CAMERA',
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
import apps from './apps';
|
||||
|
||||
function sendMessage(app: string, method: string, data: any) {
|
||||
export function sendMessage(app: string, method: string, data: any) {
|
||||
return SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app,
|
||||
@@ -21,3 +21,15 @@ export function sendMessageEvent(method: string, data: any = {}) {
|
||||
export function sendNotesEvent(method: string, data: any = {}) {
|
||||
return sendMessage(apps.NOTES, method, data);
|
||||
}
|
||||
|
||||
export function sendMarketplaceEvent(method: string, data: any = {}) {
|
||||
sendMessage(apps.MARKETPLACE, method, data);
|
||||
}
|
||||
|
||||
export function sendContactsEvent(method: string, data: any = {}) {
|
||||
sendMessage(apps.CONTACTS, method, data);
|
||||
}
|
||||
|
||||
export function sendCameraEvent(method: string, data: any = {}) {
|
||||
sendMessage(apps.CAMERA, method, data);
|
||||
}
|
||||
Reference in new issue
Block a user