|
1 | 1 | /** |
2 | 2 | * @module:plugin-muc-parsers |
3 | 3 | * @typedef {import('../muc/muc.js').default} MUC |
4 | | - * @typedef {import('./types.ts').MUCMessageAttributes} MUCMessageAttributes |
| 4 | + * @typedef {import('./types').MUCMessageAttributes} MUCMessageAttributes |
5 | 5 | */ |
6 | 6 | import dayjs from 'dayjs'; |
7 | 7 | import _converse from '../../shared/_converse.js'; |
@@ -250,15 +250,8 @@ export async function parseMUCMessage (stanza, chatbox) { |
250 | 250 | * Given an IQ stanza with a member list, create an array of objects containing |
251 | 251 | * known member data (e.g. jid, nick, role, affiliation). |
252 | 252 | * |
253 | | - * @typedef {Object} MemberListItem |
254 | | - * Either the JID or the nickname (or both) will be available. |
255 | | - * @property {string} affiliation |
256 | | - * @property {string} [role] |
257 | | - * @property {string} [jid] |
258 | | - * @property {string} [nick] |
259 | | - * |
260 | 253 | * @param {Element} iq |
261 | | - * @returns {MemberListItem[]} |
| 254 | + * @returns {import('./types').MemberListItem[]} |
262 | 255 | */ |
263 | 256 | export function parseMemberListIQ (iq) { |
264 | 257 | return sizzle(`query[xmlns="${Strophe.NS.MUC_ADMIN}"] item`, iq).map( |
@@ -289,30 +282,11 @@ export function parseMemberListIQ (iq) { |
289 | 282 |
|
290 | 283 | /** |
291 | 284 | * Parses a passed in MUC presence stanza and returns an object of attributes. |
292 | | - * @method parseMUCPresence |
293 | 285 | * @param {Element} stanza - The presence stanza |
294 | 286 | * @param {MUC} chatbox |
295 | | - * @returns {MUCPresenceAttributes} |
| 287 | + * @returns {import('./types').MUCPresenceAttributes} |
296 | 288 | */ |
297 | 289 | export function parseMUCPresence (stanza, chatbox) { |
298 | | - /** |
299 | | - * Object representing a XEP-0371 Hat |
300 | | - * @typedef {Object} MUCHat |
301 | | - * @property {string} title |
302 | | - * @property {string} uri |
303 | | - * |
304 | | - * The object which {@link parseMUCPresence} returns |
305 | | - * @typedef {Object} MUCPresenceAttributes |
306 | | - * @property {string} show |
307 | | - * @property {Array<MUCHat>} hats - An array of XEP-0317 hats |
308 | | - * @property {Array<string>} states |
309 | | - * @property {String} from - The sender JID (${muc_jid}/${nick}) |
310 | | - * @property {String} nick - The nickname of the sender |
311 | | - * @property {String} occupant_id - The XEP-0421 occupant ID |
312 | | - * @property {String} type - The type of presence |
313 | | - * @property {String} [jid] |
314 | | - * @property {boolean} [is_me] |
315 | | - */ |
316 | 290 | const from = stanza.getAttribute('from'); |
317 | 291 | const type = stanza.getAttribute('type'); |
318 | 292 | const data = { |
|
0 commit comments