-
-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring #3241
Refactoring #3241
Conversation
d634270
to
0db1ce1
Compare
6c0f760
to
5a14bf5
Compare
c31f237
to
2bdea15
Compare
Previously the `overrides` functionality of `pluggable.js` was used to `override` the `model` function on the `ChatBoxes` collection, so that different types of chatboxes could be created (e.g. MUC, ChatBox, Feed). This has been replaced with a registry, `api.chatboxes.registry`. Use `api.chatboxes.registry.add(type, model)` to add a new type of chatbox to the collection. Then when `api.chatboxes.create(attrs, options)` is called, the right type of chatbox will be created if `attrs.type` is the `type` in the registry.
2bdea15
to
1cbb5cc
Compare
Use the builtin History API and event listeners.
import chat_api from './api.js'; | ||
import { Collection } from '@converse/skeletor/src/collection'; | ||
import { _converse, api, converse } from '../../index.js'; | ||
import { _converse, api, converse, u } from '../../index.js'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
import ChatRoomOccupant from './occupant.js'; | ||
import ChatRoomOccupants from './occupants.js'; | ||
import affiliations_api from './affiliations/api.js'; | ||
import muc_api from './api.js'; | ||
import { Collection } from '@converse/skeletor/src/collection'; | ||
import { _converse, api, converse } from '../../index.js'; | ||
import { _converse, api, converse, u } from '../../index.js'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
@@ -35,7 +35,7 @@ | |||
return; | |||
} | |||
if (api.settings.get('allow_url_history_change')) { | |||
_converse.router.history.navigate(`#${oldest_message.get('msgid')}`); | |||
history.pushState(null, '', `#${oldest_message.get('msgid')}`) |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
No description provided.