-
-
Notifications
You must be signed in to change notification settings - Fork 779
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
MAM Refactor #3599
base: master
Are you sure you want to change the base?
MAM Refactor #3599
Conversation
src/headless/plugins/mam/api.js
Outdated
stx`<field var="with"><value>${options.mam?.with}</value></field>` : '' } | ||
${!extended_support && attrs.start ? | ||
stx`<field var="start"><value>${attrs.start}</value></field>` : '' } | ||
${!extended_support && attrs.end ? |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
the enclosing function
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 2 days ago
To fix the problem, we need to add an explicit semicolon at the end of the line where the implicit semicolon insertion might occur. This will ensure that the code behaves as expected and follows the convention used in the rest of the codebase.
- Add an explicit semicolon at the end of the line
const iq_result = await api.sendIQ(stanza, timeout, false)
in the filesrc/headless/plugins/mam/api.js
.
-
Copy modified line R283
@@ -282,3 +282,3 @@ | ||
const timeout = api.settings.get('message_archiving_timeout'); | ||
const iq_result = await api.sendIQ(stanza, timeout, false) | ||
const iq_result = await api.sendIQ(stanza, timeout, false); | ||
if (iq_result === null) { |
if (options.groupchat) { | ||
if (from !== options['with']) { | ||
if (options.is_groupchat) { | ||
if (from !== options.mam?.with) { |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
the enclosing function
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 2 days ago
To fix the problem, we need to add an explicit semicolon at the end of the line const complete = fin?.getAttribute('complete') === 'true'
. This will ensure that the statement is properly terminated and prevent any potential issues related to automatic semicolon insertion.
-
Copy modified line R303
@@ -302,3 +302,3 @@ | ||
const fin = iq_result && sizzle(`fin[xmlns="${NS.MAM}"]`, iq_result).pop(); | ||
const complete = fin?.getAttribute('complete') === 'true' | ||
const complete = fin?.getAttribute('complete') === 'true'; | ||
const set = sizzle(`set[xmlns="${NS.RSM}"]`, fin).pop(); |
9de8961
to
079c685
Compare
- Remove the `fetchMessagesOnScrollUp` event handler. Instead messages will be fetched as the placeholder comes into view. - Clarify types and distinguish between MAM query options and RSM query options. - Improve error handling
- Remove support for mam2:#extended querying It's too much of a headache with patchy server support. Instead, use RSM's `<before>some-id</before>` together with `start` to bracket queries for placeholders. - Create a placeholder after restoring cached messages This placeholder will automatically fetch older messages when the user scrolls up. - Create new config option `auto_fill_history_gaps`
079c685
to
f80d331
Compare
No description provided.