mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Add support for XEP-0372: References
Add support for XEP-0372: References Fixes SMACK-799
This commit is contained in:
parent
27808e9e8c
commit
b81f8fe18e
10 changed files with 508 additions and 0 deletions
19
documentation/extensions/references.md
Normal file
19
documentation/extensions/references.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
References
|
||||
==========
|
||||
|
||||
[Back](index.md)
|
||||
|
||||
References are a way to refer to other entities like users, other messages or external data from within a message.
|
||||
|
||||
Typical use-cases are mentioning other users by name, but referencing to their BareJid, or linking to a sent file.
|
||||
|
||||
## Usage
|
||||
|
||||
Mention a user and link to their bare jid.
|
||||
```
|
||||
Message message = new Message("Alice is a realy nice person.");
|
||||
BareJid alice = JidCreate.bareFrom("alice@capulet.lit");
|
||||
ReferenceManager.addMention(message, 0, 5, alice);
|
||||
```
|
||||
|
||||
TODO: Add more use cases (for example for MIX, SIMS...)
|
Loading…
Add table
Add a link
Reference in a new issue