mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
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
|
@ -880,7 +880,6 @@ export default class App extends Component {
|
|||
case "ACK":
|
||||
case "BOUNCER":
|
||||
case "MARKREAD":
|
||||
case "READ":
|
||||
// Ignore these
|
||||
return [];
|
||||
default:
|
||||
|
@ -1031,7 +1030,6 @@ export default class App extends Component {
|
|||
}
|
||||
break;
|
||||
case "MARKREAD":
|
||||
case "READ":
|
||||
target = msg.params[0];
|
||||
let bound = msg.params[1];
|
||||
if (bound === "*" || !bound.startsWith("timestamp=")) {
|
||||
|
|
|
@ -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…
Reference in a new issue