Improved protocol

This commit is contained in:
2025-12-22 12:45:48 +01:00
parent 75dfdac920
commit be4917ce80
8 changed files with 491 additions and 153 deletions
+9 -10
View File
@@ -42,16 +42,15 @@ export default function DMs() {
(m.channel_id === id && m.from === app.profile?.id) ||
(m.from === id && m.channel_id === app.profile?.id)
)}
sendMessage={(message) => {
targetNode.current?.send(
JSON.stringify({
type: "send_message",
params: {
channel_id: id,
contents: message,
},
})
);
sendRequest={(req) => {
switch (req.type) {
case "send_message":
targetNode.current?.send(JSON.stringify(req));
break;
default:
app.node.current?.send(JSON.stringify(req));
break;
}
}}
/>
</AppLayout>