mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-28 02:05:41 -05:00
Fetch read marker before backlog for user targets
This commit is contained in:
parent
e7b69cec9a
commit
4780b9c709
2 changed files with 11 additions and 0 deletions
|
@ -1128,6 +1128,12 @@ export default class App extends Component {
|
||||||
from = receiptFromMessage(lastMsg);
|
from = receiptFromMessage(lastMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Query read marker if this is a user (ie, we haven't received
|
||||||
|
// the read marker as part of a JOIN burst)
|
||||||
|
if (client.supportsReadMarker() && client.isNick(target.name)) {
|
||||||
|
client.fetchReadMarker(target.name);
|
||||||
|
}
|
||||||
|
|
||||||
client.fetchHistoryBetween(target.name, from, to, CHATHISTORY_MAX_SIZE).then((result) => {
|
client.fetchHistoryBetween(target.name, from, to, CHATHISTORY_MAX_SIZE).then((result) => {
|
||||||
for (let msg of result.messages) {
|
for (let msg of result.messages) {
|
||||||
let destBuffers = this.routeMessage(serverID, msg);
|
let destBuffers = this.routeMessage(serverID, msg);
|
||||||
|
|
|
@ -720,6 +720,11 @@ export default class Client extends EventTarget {
|
||||||
return chanTypes.indexOf(name[0]) >= 0;
|
return chanTypes.indexOf(name[0]) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isNick(name) {
|
||||||
|
// A dollar sign is used for server-wide broadcasts
|
||||||
|
return !this.isServer(name) && !this.isChannel(name) && !name.startsWith('$');
|
||||||
|
}
|
||||||
|
|
||||||
setPingInterval(sec) {
|
setPingInterval(sec) {
|
||||||
clearInterval(this.pingIntervalID);
|
clearInterval(this.pingIntervalID);
|
||||||
this.pingIntervalID = null;
|
this.pingIntervalID = null;
|
||||||
|
|
Loading…
Reference in a new issue