Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix: Remove deprecated descr field #65

Merged
merged 14 commits into from
Dec 16, 2024
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
*~
*~
.direnv
2 changes: 1 addition & 1 deletion backend/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function createFrontend(
app.post<any, { status: string }>("/fake-update", (req, res) => {
const instanceId = Array.from(instances.instances.keys())[0];
const instance = instances.instances.get(instanceId);
instance?.webXdc.sendUpdate({ payload: req.body }, "fake update");
instance?.webXdc.sendUpdate({ payload: req.body }, "");
res.json({
status: "ok",
});
Expand Down
5 changes: 2 additions & 3 deletions backend/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export type Options = {
type SendUpdateMessage = {
type: "sendUpdate";
update: ReceivedStatusUpdate<any>;
descr: string;
};

type SetUpdateListenerMessage = {
Expand Down Expand Up @@ -125,15 +124,15 @@ export class Instances {
const parsed = JSON.parse(msg);
// XXX should validate parsed
if (isSendUpdateMessage(parsed)) {
instance.webXdc.sendUpdate(parsed.update, parsed.descr);
instance.webXdc.sendUpdate(parsed.update, "");
} else if (isSetUpdateListenerMessage(parsed)) {
instance.webXdc.connect(
(updates) => {
return broadcast(
wss,
JSON.stringify({
type: "updates",
updates: updates.map(([update]) => update),
updates: updates.map((update) => update),
}),
);
},
Expand Down
Loading
Loading