Clean-up
This commit is contained in:
parent
dda51c1499
commit
8086444098
6 changed files with 106 additions and 197 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { Socket } from 'socket.io-client';
|
||||
import type { ClientProfil } from '../types_front';
|
||||
|
||||
/**
|
||||
* getProfil of a user
|
||||
|
|
@ -9,13 +10,14 @@ import { Socket } from 'socket.io-client';
|
|||
|
||||
export function getProfil(socket: Socket, user: string) {
|
||||
if (!socket.connected) return;
|
||||
const profil = {
|
||||
const profil: ClientProfil = {
|
||||
command: '@profile',
|
||||
destination: 'profilMessage',
|
||||
type: "chat",
|
||||
user: user,
|
||||
token: document.cookie ?? "",
|
||||
text: user,
|
||||
userID: '',
|
||||
timestamp: Date.now(),
|
||||
SenderWindowID: socket.id,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue