mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-10-04 21:49:33 +02:00
Merge pull request #407 from vanitasvitae/oxDeadCode
OX-IM: Remove redundant code to add self to recipients
This commit is contained in:
commit
037bf3a27c
|
@ -264,7 +264,7 @@ public final class OXInstantMessagingManager extends Manager {
|
|||
* Add an OX-IM message element to a message.
|
||||
*
|
||||
* @param messageBuilder message
|
||||
* @param contacts recipients of the message
|
||||
* @param recipients recipients of the message
|
||||
* @param payload payload which will be encrypted and signed
|
||||
*
|
||||
* @return metadata about the messages encryption + signatures.
|
||||
|
@ -273,13 +273,9 @@ public final class OXInstantMessagingManager extends Manager {
|
|||
* @throws PGPException in case something goes wrong during encryption
|
||||
* @throws IOException IO is dangerous (we need to read keys)
|
||||
*/
|
||||
public OpenPgpMetadata addOxMessage(MessageBuilder messageBuilder, Set<OpenPgpContact> contacts, List<ExtensionElement> payload)
|
||||
public OpenPgpMetadata addOxMessage(MessageBuilder messageBuilder, Set<OpenPgpContact> recipients, List<ExtensionElement> payload)
|
||||
throws SmackException.NotLoggedInException, IOException, PGPException {
|
||||
|
||||
HashSet<OpenPgpContact> recipients = new HashSet<>(contacts);
|
||||
OpenPgpContact self = openPgpManager.getOpenPgpSelf();
|
||||
recipients.add(self);
|
||||
|
||||
OpenPgpElementAndMetadata openPgpElementAndMetadata = signAndEncrypt(recipients, payload);
|
||||
messageBuilder.addExtension(openPgpElementAndMetadata.getElement());
|
||||
|
||||
|
|
Loading…
Reference in a new issue