Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
46ccc1a8
Commit
46ccc1a8
authored
Sep 06, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #1692
parent
cc91f375
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
CHANGES.md
CHANGES.md
+2
-0
src/converse-mam-views.js
src/converse-mam-views.js
+14
-12
No files found.
CHANGES.md
View file @
46ccc1a8
...
@@ -12,6 +12,8 @@
...
@@ -12,6 +12,8 @@
different path, you'll need to set
`publicPath`
in
`webpack.config.js`
to
different path, you'll need to set
`publicPath`
in
`webpack.config.js`
to
your preferred path and then rebuild all assets (e.g.
`make dist`
).
your preferred path and then rebuild all assets (e.g.
`make dist`
).
-
Use
`listenTo`
to avoid memory leaks when views get removed.
-
Use
`listenTo`
to avoid memory leaks when views get removed.
-
#1692 Bugfix:
`TypeError: oldest_message is undefined`
## 5.0.1 (2019-08-14)
## 5.0.1 (2019-08-14)
...
...
src/converse-mam-views.js
View file @
46ccc1a8
...
@@ -37,19 +37,21 @@ converse.plugins.add('converse-mam-views', {
...
@@ -37,19 +37,21 @@ converse.plugins.add('converse-mam-views', {
const
{
_converse
}
=
this
.
__super__
;
const
{
_converse
}
=
this
.
__super__
;
if
(
this
.
content
.
scrollTop
===
0
&&
this
.
model
.
messages
.
length
)
{
if
(
this
.
content
.
scrollTop
===
0
&&
this
.
model
.
messages
.
length
)
{
const
oldest_message
=
this
.
model
.
getOldestMessage
();
const
oldest_message
=
this
.
model
.
getOldestMessage
();
const
by_jid
=
this
.
model
.
get
(
'
jid
'
);
if
(
oldest_message
)
{
const
stanza_id
=
oldest_message
&&
oldest_message
.
get
(
`stanza_id
${
by_jid
}
`
);
const
by_jid
=
this
.
model
.
get
(
'
jid
'
);
this
.
addSpinner
();
const
stanza_id
=
oldest_message
&&
oldest_message
.
get
(
`stanza_id
${
by_jid
}
`
);
if
(
stanza_id
)
{
this
.
addSpinner
();
await
this
.
model
.
fetchArchivedMessages
({
if
(
stanza_id
)
{
'
before
'
:
stanza_id
await
this
.
model
.
fetchArchivedMessages
({
});
'
before
'
:
stanza_id
}
else
{
});
await
this
.
model
.
fetchArchivedMessages
({
}
else
{
'
end
'
:
oldest_message
.
get
(
'
time
'
)
await
this
.
model
.
fetchArchivedMessages
({
});
'
end
'
:
oldest_message
.
get
(
'
time
'
)
});
}
this
.
clearSpinner
();
}
}
this
.
clearSpinner
();
}
}
}
}
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment