Add user page with profile picture, number and about. change font to Selawik.
This commit is contained in:
parent
0af3395ad7
commit
cce7b74068
12 changed files with 219 additions and 29 deletions
|
|
@ -43,8 +43,20 @@ export function getGroups() {
|
|||
return chats.filter(c => c.id.endsWith("@g.us"));
|
||||
}
|
||||
|
||||
export function getUser(number) {
|
||||
return users.find(user => user.id === number);
|
||||
export async function getUser(number) {
|
||||
if (online) {
|
||||
return await waha.getUser(number);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export async function getUserAbout(userId) {
|
||||
if (online) {
|
||||
return await waha.getUserAbout(userId);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export function getChats() {
|
||||
|
|
@ -125,4 +137,14 @@ export async function getChatPicture(chatId) {
|
|||
|
||||
export function isOnline() {
|
||||
return online;
|
||||
}
|
||||
|
||||
export async function sendStatus(text) {
|
||||
if (online) {
|
||||
return await waha.setStatus(text);
|
||||
} else {
|
||||
return {
|
||||
success: false
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue