Compare commits
No commits in common. "4eea780cf7506d50320af7a3e83d08f047fad6c2" and "0b6f383a6355499f26e8462840ed4629eb3dcee0" have entirely different histories.
4eea780cf7
...
0b6f383a63
@ -1,6 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
<<<<<<< HEAD
|
||||
## 11.0.0 (Not Released Yet)
|
||||
|
||||
### New features
|
||||
@ -10,13 +9,6 @@
|
||||
### Minor changes and fixes
|
||||
|
||||
* New translation: Albanian
|
||||
=======
|
||||
## 10.3.2
|
||||
|
||||
### Minor changes and fixes
|
||||
|
||||
* Fix #477: ended polls never disappear when archiving is disabled (and no more than 20 new messages).
|
||||
>>>>>>> tags/v10.3.2
|
||||
|
||||
## 10.3.1
|
||||
|
||||
|
@ -12,8 +12,6 @@ import './components/poll-form-view.js'
|
||||
|
||||
const { sizzle } = converse.env
|
||||
|
||||
const delayedTimeout = 2 // for delayed poll message, how long must the be considered as valid.
|
||||
|
||||
converse.plugins.add('livechat-converse-poll', {
|
||||
dependencies: ['converse-muc', 'converse-disco'],
|
||||
|
||||
@ -99,23 +97,6 @@ converse.plugins.add('livechat-converse-poll', {
|
||||
if (attrs.is_archived) {
|
||||
return this.__super__.onMessage(attrs)
|
||||
}
|
||||
if (attrs.is_delayed) {
|
||||
// When archiving is disabled, the "history" mechanism is still available:
|
||||
// Last X (20 by default) messages will be kept, and sent to users.
|
||||
// The only thing that differentiates such messages is that they are delayed.
|
||||
// We can't just ignore all delayed messages, because if one day we enable SMACKS
|
||||
// (to handle deconnections on poor network), there could be some legitimate delayed messages.
|
||||
// So we will only ignore the poll if it was sent more than X minutes ago.
|
||||
console.debug('Got a delayed poll message, checking if old or not')
|
||||
const d = new Date()
|
||||
d.setMinutes(d.getMinutes() - delayedTimeout)
|
||||
if (attrs.time < d.toISOString()) {
|
||||
console.debug(
|
||||
`Poll message was delayed fore more than ${delayedTimeout} minutes (${attrs.time} < ${d.toISOString()}).`
|
||||
)
|
||||
return this.__super__.onMessage(attrs)
|
||||
}
|
||||
}
|
||||
|
||||
console.info('Got a poll message, setting it as the current_poll')
|
||||
// this will be displayed by the livechat-converse-muc-poll custom element,
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "peertube-plugin-livechat",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "peertube-plugin-livechat",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.1",
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"@xmpp/jid": "^0.13.1",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "peertube-plugin-livechat",
|
||||
"description": "NCTV fork of the peertube-plugin-livechat plugin, containing styling and other shit. This will be maintained with upstream.",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.1",
|
||||
"license": "AGPL-3.0",
|
||||
"author": {
|
||||
"name": "Matty Boombalatty",
|
||||
|
Loading…
Reference in New Issue
Block a user