send real list of services

This commit is contained in:
Artem Titoulenko 2021-09-08 13:01:43 -04:00
parent f20f524af0
commit 4880c42647

View file

@ -72,12 +72,15 @@ class Communicator {
switch (tlv.type) { switch (tlv.type) {
case 0x06: // Requesting available services case 0x06: // Requesting available services
const resp = new FLAP(2, this._getNewSequenceNumber(), new SNAC(0x01, 0x03, FLAGS_EMPTY, 0, [ // this is just a dword list of service families
Buffer.from([0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, const servicesOffered = [];
0x00, 0x06, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0A, Object.values(this.services).forEach((service) => {
0x00, 0x0B, 0x00, 0x0C, 0x00, 0x13, 0x00, 0x15, servicesOffered.push(Buffer.from([0x00, service.family]));
]), // Buddy List management service });
])); const resp = new FLAP(2, this._getNewSequenceNumber(),
new SNAC(0x01, 0x03, FLAGS_EMPTY, 0, [
Buffer.concat(servicesOffered),
]));
this.send(resp); this.send(resp);
return; return;
} }