forked from andyburke/autonomous.contact
fix: fix message submission
This commit is contained in:
parent
e52a9e997c
commit
6df0673c8e
3 changed files with 20 additions and 14 deletions
|
|
@ -54,7 +54,7 @@
|
|||
topic_changed: {
|
||||
detail: {
|
||||
previous,
|
||||
topic: topic_id
|
||||
topic_id
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
document.dispatchEvent(new CustomEvent( "topic_changed", {
|
||||
detail: {
|
||||
previous,
|
||||
topic: topic_id
|
||||
topic_id
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
@ -89,14 +89,14 @@
|
|||
}
|
||||
}
|
||||
window.addEventListener("locationchange", extract_url_hash_info);
|
||||
document.addEventListener( 'topic_changed', ( {detail: { topic }}) => {
|
||||
if ( !topic ) {
|
||||
document.addEventListener( 'topic_changed', ( {detail: { topic_id }}) => {
|
||||
if ( !topic_id ) {
|
||||
const first_topic_id = TOPICS?.[0]?.id;
|
||||
if ( first_topic_id ) {
|
||||
window.location.hash = `/topic/${ first_topic_id }/chat`;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
let TOPICS = [];
|
||||
let last_topic_update = undefined;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue