Skip to content

Commit dea6ad0

Browse files
authored
Merge pull request #65 from webxdc/sk/remove_descr
Fix: Remove deprecated `descr` field
2 parents 9545733 + 63f3b90 commit dea6ad0

10 files changed

+113
-149
lines changed

backend/app.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function createFrontend(
8484
app.post<any, { status: string }>("/fake-update", (req, res) => {
8585
const instanceId = Array.from(instances.instances.keys())[0];
8686
const instance = instances.instances.get(instanceId);
87-
instance?.webXdc.sendUpdate({ payload: req.body }, "fake update");
87+
instance?.webXdc.sendUpdate({ payload: req.body }, "");
8888
res.json({
8989
status: "ok",
9090
});

backend/instance.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export type Options = {
1919
type SendUpdateMessage = {
2020
type: "sendUpdate";
2121
update: ReceivedStatusUpdate<any>;
22-
descr: string;
2322
};
2423

2524
type SetUpdateListenerMessage = {
@@ -125,15 +124,15 @@ export class Instances {
125124
const parsed = JSON.parse(msg);
126125
// XXX should validate parsed
127126
if (isSendUpdateMessage(parsed)) {
128-
instance.webXdc.sendUpdate(parsed.update, parsed.descr);
127+
instance.webXdc.sendUpdate(parsed.update, "");
129128
} else if (isSetUpdateListenerMessage(parsed)) {
130129
instance.webXdc.connect(
131130
(updates) => {
132131
return broadcast(
133132
wss,
134133
JSON.stringify({
135134
type: "updates",
136-
updates: updates.map(([update]) => update),
135+
updates: updates.map((update) => update),
137136
}),
138137
);
139138
},

0 commit comments

Comments
 (0)