mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-25 14:27:01 -04:00
XSOverlay: Return old API for compatibility (#2753)
This commit is contained in:
parent
e99eec50bc
commit
09c6c16cf9
2 changed files with 29 additions and 1 deletions
16
src/plugins/xsOverlay/native.ts
Normal file
16
src/plugins/xsOverlay/native.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2023 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { createSocket, Socket } from "dgram";
|
||||
|
||||
let xsoSocket: Socket;
|
||||
|
||||
export function sendToOverlay(_, data: any) {
|
||||
data.messageType = data.type;
|
||||
const json = JSON.stringify(data);
|
||||
xsoSocket ??= createSocket("udp4");
|
||||
xsoSocket.send(json, 42069, "127.0.0.1");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue