Mercurial > prosody-modules
comparison mod_groups_internal/README.md @ 6151:5250e4cb0b1a
mod_groups_internal: Replace tabs by spaces in README
| author | Rémi Bardon <remi@remibardon.name> |
|---|---|
| date | Fri, 31 Jan 2025 02:50:23 +0100 |
| parents | ce0579449dba |
| children | 8f52eb411737 |
comparison
equal
deleted
inserted
replaced
| 6150:41ce8e9e04c2 | 6151:5250e4cb0b1a |
|---|---|
| 59 | 59 |
| 60 **Returns:** | 60 **Returns:** |
| 61 | 61 |
| 62 ```lua | 62 ```lua |
| 63 group_info: { | 63 group_info: { |
| 64 name: string, | 64 name: string, |
| 65 muc_jid: string | nil | 65 muc_jid: string | nil |
| 66 } | 66 } |
| 67 | nil | 67 | nil |
| 68 ``` | 68 ``` |
| 69 | 69 |
| 70 #### `set_info(group_id, info)` {#set_info} | 70 #### `set_info(group_id, info)` {#set_info} |
| 173 | 173 |
| 174 **Returns[^pseudo-lua]:** | 174 **Returns[^pseudo-lua]:** |
| 175 | 175 |
| 176 ```lua | 176 ```lua |
| 177 muc: { | 177 muc: { |
| 178 jid: string, | 178 jid: string, |
| 179 name: string, | 179 name: string, |
| 180 } | 180 } |
| 181 | nil, error: string | 181 | nil, error: string |
| 182 ``` | 182 ``` |
| 183 | 183 |
| 184 #### `remove_group_chat(group_id, muc_id)` {#remove_group_chat} | 184 #### `remove_group_chat(group_id, muc_id)` {#remove_group_chat} |
| 210 | 210 |
| 211 **Returns[^pseudo-lua]:** | 211 **Returns[^pseudo-lua]:** |
| 212 | 212 |
| 213 ```lua | 213 ```lua |
| 214 group_chats: [ | 214 group_chats: [ |
| 215 { | 215 { |
| 216 id: string, -- muc_id (node part of the MUC JID) | 216 id: string, -- muc_id (node part of the MUC JID) |
| 217 jid: string, | 217 jid: string, |
| 218 name: string, | 218 name: string, |
| 219 deleted = boolean, | 219 deleted = boolean, |
| 220 } | 220 } |
| 221 ] | 221 ] |
| 222 | nil | 222 | nil |
| 223 ``` | 223 ``` |
| 224 | 224 |
| 225 #### `emit_member_events(group_id)` {#emit_member_events} | 225 #### `emit_member_events(group_id)` {#emit_member_events} |
| 239 **Returns[^pseudo-lua]:** | 239 **Returns[^pseudo-lua]:** |
| 240 | 240 |
| 241 ```lua | 241 ```lua |
| 242 groups: { | 242 groups: { |
| 243 [<group_id>]: { | 243 [<group_id>]: { |
| 244 name: string, | 244 name: string, |
| 245 muc_jid: string | nil | 245 muc_jid: string | nil |
| 246 } | 246 } |
| 247 } | 247 } |
| 248 ``` | 248 ``` |
| 249 | 249 |
| 250 (Where `<group_id>` is a | 250 (Where `<group_id>` is a |
| 251 | 251 |
| 257 | 257 |
| 258 Payload structure: | 258 Payload structure: |
| 259 | 259 |
| 260 ```lua | 260 ```lua |
| 261 { | 261 { |
| 262 id: string, -- group_id (node part of the group's JID) | 262 id: string, -- group_id (node part of the group's JID) |
| 263 user: string, -- username (node part of the user's JID) | 263 user: string, -- username (node part of the user's JID) |
| 264 host: string, -- <module.host> | 264 host: string, -- <module.host> |
| 265 group_info: { | 265 group_info: { |
| 266 name: string, | 266 name: string, |
| 267 muc_jid: string | nil, | 267 muc_jid: string | nil, |
| 268 mucs: [string] | nil, | 268 mucs: [string] | nil, |
| 269 }, | 269 }, |
| 270 } | 270 } |
| 271 ``` | 271 ``` |
| 272 | 272 |
| 273 #### `group-user-removed` {#group-user-removed} | 273 #### `group-user-removed` {#group-user-removed} |
| 274 | 274 |
| 276 | 276 |
| 277 Payload structure: | 277 Payload structure: |
| 278 | 278 |
| 279 ```lua | 279 ```lua |
| 280 { | 280 { |
| 281 id: string, -- group_id (node part of the group's JID) | 281 id: string, -- group_id (node part of the group's JID) |
| 282 user: string, -- username (node part of the user's JID) | 282 user: string, -- username (node part of the user's JID) |
| 283 host: string, -- <module.host> | 283 host: string, -- <module.host> |
| 284 group_info: { | 284 group_info: { |
| 285 name: string, | 285 name: string, |
| 286 muc_jid: string | nil, | 286 muc_jid: string | nil, |
| 287 mucs: [string] | nil, | 287 mucs: [string] | nil, |
| 288 }, | 288 }, |
| 289 } | 289 } |
| 290 ``` | 290 ``` |
| 291 | 291 |
| 292 #### `group-chat-added` {#group-chat-added} | 292 #### `group-chat-added` {#group-chat-added} |
| 293 | 293 |
| 295 | 295 |
| 296 Payload structure: | 296 Payload structure: |
| 297 | 297 |
| 298 ```lua | 298 ```lua |
| 299 { | 299 { |
| 300 group_id: string, | 300 group_id: string, |
| 301 group_info: { | 301 group_info: { |
| 302 name: string, | 302 name: string, |
| 303 mucs: [string], | 303 mucs: [string], |
| 304 }, | 304 }, |
| 305 muc: { | 305 muc: { |
| 306 jid: string, | 306 jid: string, |
| 307 name: string, | 307 name: string, |
| 308 }, | 308 }, |
| 309 } | 309 } |
| 310 ``` | 310 ``` |
| 311 | 311 |
| 312 #### `group-chat-removed` {#group-chat-removed} | 312 #### `group-chat-removed` {#group-chat-removed} |
| 313 | 313 |
| 315 | 315 |
| 316 Payload structure: | 316 Payload structure: |
| 317 | 317 |
| 318 ```lua | 318 ```lua |
| 319 { | 319 { |
| 320 group_id: string, -- group_id (node part of the group's JID) | 320 group_id: string, -- group_id (node part of the group's JID) |
| 321 group_info: { | 321 group_info: { |
| 322 name: string, | 322 name: string, |
| 323 mucs: [string], | 323 mucs: [string], |
| 324 }, | 324 }, |
| 325 muc: { | 325 muc: { |
| 326 id: string, -- muc_id (node part of the MUC JID) | 326 id: string, -- muc_id (node part of the MUC JID) |
| 327 jid: string, | 327 jid: string, |
| 328 }, | 328 }, |
| 329 } | 329 } |
| 330 ``` | 330 ``` |
| 331 | 331 |
| 332 [^pseudo-lua]: As "pseudo-Lua" code. `[…]` represents a list and `[…]` as a map key means `0..n` times the key (it's not just one element). | 332 [^pseudo-lua]: As "pseudo-Lua" code. `[…]` represents a list and `[…]` as a map key means `0..n` times the key (it's not just one element). |
| 333 | 333 |
