mirror of
https://git.sr.ht/~emersion/gamja
synced 2025-04-23 12:33:45 -04:00
parent
e3c2d85a94
commit
cca12d0b95
2 changed files with 16 additions and 0 deletions
|
@ -1101,6 +1101,11 @@ export default class App extends Component {
|
|||
from = receiptFromMessage(lastMsg);
|
||||
}
|
||||
|
||||
if (client.caps.enabled.has("soju.im/search")) {
|
||||
// TODO:
|
||||
return;
|
||||
}
|
||||
|
||||
client.fetchHistoryBetween(target.name, from, to, CHATHISTORY_MAX_SIZE).then((result) => {
|
||||
for (let msg of result.messages) {
|
||||
let destBuffers = this.routeMessage(serverID, msg);
|
||||
|
|
|
@ -24,6 +24,7 @@ const permanentCaps = [
|
|||
|
||||
"soju.im/bouncer-networks",
|
||||
"soju.im/read",
|
||||
"soju.im/search",
|
||||
];
|
||||
|
||||
const RECONNECT_MIN_DELAY_MSEC = 10 * 1000; // 10s
|
||||
|
@ -926,6 +927,16 @@ export default class Client extends EventTarget {
|
|||
});
|
||||
}
|
||||
|
||||
search(attrs) {
|
||||
let msg = {
|
||||
command: "SEARCH",
|
||||
params: [irc.formatTags(attrs)],
|
||||
};
|
||||
return this.fetchBatch(msg, "soju.im/search").then((batch) => {
|
||||
return batch.messages;
|
||||
});
|
||||
}
|
||||
|
||||
listBouncerNetworks() {
|
||||
let req = { command: "BOUNCER", params: ["LISTNETWORKS"] };
|
||||
return this.fetchBatch(req, "soju.im/bouncer-networks").then((batch) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue