Drop support for soju.im/read
It's been superseded by draft/read-marker.
This commit is contained in:
parent
e6618c8a1f
commit
a2d2a11d44
2 changed files with 3 additions and 16 deletions
|
@ -24,7 +24,6 @@ const permanentCaps = [
|
|||
"draft/read-marker",
|
||||
|
||||
"soju.im/bouncer-networks",
|
||||
"soju.im/read",
|
||||
];
|
||||
|
||||
const RECONNECT_MIN_DELAY_MSEC = 10 * 1000; // 10s
|
||||
|
@ -1023,29 +1022,19 @@ export default class Client extends EventTarget {
|
|||
}
|
||||
|
||||
supportsReadMarker() {
|
||||
return this.caps.enabled.has("draft/read-marker") || this.caps.enabled.has("soju.im/read");
|
||||
}
|
||||
|
||||
_markReadCmd() {
|
||||
if (this.caps.enabled.has("draft/read-marker")) {
|
||||
return "MARKREAD";
|
||||
} else if (this.caps.enabled.has("soju.im/read")) {
|
||||
return "READ";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
return this.caps.enabled.has("draft/read-marker");
|
||||
}
|
||||
|
||||
fetchReadMarker(target) {
|
||||
this.send({
|
||||
command: this._markReadCmd(),
|
||||
command: "MARKREAD",
|
||||
params: [target],
|
||||
});
|
||||
}
|
||||
|
||||
setReadMarker(target, t) {
|
||||
this.send({
|
||||
command: this._markReadCmd(),
|
||||
command: "MARKREAD",
|
||||
params: [target, "timestamp="+t],
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue