Fix sid parsing in EOSE to close REQ

This commit is contained in:
Thomas Mathews 2022-12-26 12:06:17 -08:00
parent bba6f4b784
commit 587c2c3b32

View file

@ -180,7 +180,8 @@ async function on_pool_eose(relay, sub_id) {
const model = DAMUS;
const { pool } = model;
const sid = sub_id.slice(0, sub_id.indexOf(":"));
const index = sub_id.indexOf(":");
const sid = sub_id.slice(0, index >= 0 ? index : sub_id.length);
switch (sid) {
case SID_THREAD:
case SID_PROFILES: