-
Also implemented, together with issue #42
-
Please provide code examples for the following:
- Retrieve list of all blocked JIDs
- Add JID to blocked list
@andrzej.wojcik if I block a JID, on one resource will I get a notification about this new blocked JID on other connected resources?
-
@kobit As stated in XEP-0191:
The server MUST also send an IQ-set to all of the user's resources that have requested the blocklist, containing the blocked item(s):
<iq to='juliet@capulet.com/chamber' type='set' id='push1'> <block xmlns='urn:xmpp:blocking'> <item jid='romeo@montague.net'/> </block> </iq>
This means that you will get notified.
-
halcyon.getModule<BlockingCommandModule>(BlockingCommandModule.TYPE) .block("spammer@server.com".toBareJID(), Reason.Spam, "It is SPAMMER!!!") .response { it.onSuccess { println("Done") } it.onFailure { println("Oops!") } }.send()
You can also may listen for information about updates of blocked list:
halcyon.eventBus.register<BlockingCommandEvent>(BlockingCommandEvent.TYPE) { event -> when (event) { is BlockingCommandEvent.Blocked -> println("$event") is BlockingCommandEvent.Unblocked -> println("$event") is BlockingCommandEvent.UnblockedAll -> println("All blocked contacts are unblocked now!") } }
But those events will be fired only when client previously retrieve list of blocked contacts (in other case, server do not push information):
halcyon.getModule<BlockingCommandModule>(BlockingCommandModule.TYPE).retrieveList().response { it.onSuccess { println("Blocked: $it") } it.onFailure { println("Oops!") } }.send()
-
Sevan will be taking over client implementation, so we need to have it documented in one place. @bmalkow please add this to our documentation for the Kangaroo project in the Kangaroo github repo.
-
Documentation to module is here: https://github.com/tigase/halcyon/blob/master/src/docs/asciidoc/text/modules/BlockingCommandModule.asciidoc Should I also add it to Kangaroo GitHub repo? If yes, then where exactly?
-
Again assigned back to Sevan.
@sevan.evans please review both documents and let us know if something is not clear yet. We can also talk about this during our Zoom session.
-
When using the
Block
button on a contact, the client will be prompted with a dialog asking if they would like to report the JID for spam. IfYes
is clicked, the offender will be reported with theReport.Spam
tagThe client will be prompted after that the user has been blocked.
You can find blocked users in the contacts menu, or in the dedicated Blocked Contacts list. The reason that blocked JID's are not hidden from the client in the contact menu, is incase a blocked user is added into a chat that the client is also added into, therefore giving a reason that they are not able to see their chat messages.
Unblocking works as expected (image after unblocking all contacts):
Type |
New Feature
|
Priority |
Normal
|
Assignee | |
Spent time |
0
|
XEP-0191: Blocking Command