Files
new-phone-who-dis/resources/utils/messages.ts
T
Erik 6b865f2e73 Feature/tinder (#179)
* basic framework for match/tinder

* working version of swiping

* working version of profile editing

* introducing backend

* working matching system

* working profile updating

* fix all linting issues

* updated events to Enum

* working profile generation

* documentation updates

* general PR feedback

* working profile loading, matches show matchedAt

* slight modification to event strings

* added sql imports
2021-03-26 13:29:51 -04:00

40 lines
1018 B
TypeScript

import apps from './apps';
export function sendMessage(app: string, method: string, data: any) {
return SendNuiMessage(
JSON.stringify({
app,
method,
data,
}),
);
}
export function sendTwitterMessage(method: string, data: any = {}) {
return sendMessage(apps.TWITTER, method, data);
}
export function sendMessageEvent(method: string, data: any = {}) {
return sendMessage(apps.MESSAGES, method, data);
}
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);
}
export function sendMatchEvent(method: string, data: any = {}) {
return sendMessage(apps.MATCH, method, data);
}