Fix sid parsing in EOSE to close REQ
This commit is contained in:
parent
bba6f4b784
commit
587c2c3b32
1 changed files with 3 additions and 2 deletions
|
@ -179,8 +179,9 @@ async function on_pool_eose(relay, sub_id) {
|
|||
log_info(`EOSE(${relay.url}): ${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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue