Commit f32f390a authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

software/js-drone: allow drones to subscribe to their own messages

parent 13df5f9e
......@@ -46,4 +46,4 @@ md5sum = c3858b5ec7373a0932fcda911a8177b5
[worker]
_update_hash_filename_ = drone-scripts/worker.js.jinja2
md5sum = b986e1772f0cfc4d893e6a1b5fdb1683
md5sum = 5002c716486ebaac68a8381b1c8a9b0a
......@@ -270,7 +270,7 @@ import { evalScript, fdopen, loadFile, open } from "std";
case "update":
Object.entries(peer_dict).forEach(function ([id, peer]) {
message = peer.message;
if (user_me.id !== Number(id) && message.length > 0) {
if (message.length > 0) {
message = JSON.parse(message);
if (message.timestamp != last_message_timestamp &&
user_me.hasOwnProperty("onGetMsg") &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment