presence: Make PresencePayload a trait, and implement it on every payload.
This commit is contained in:
parent
709666bb91
commit
e41de29d9d
7 changed files with 20 additions and 61 deletions
|
|
@ -4,6 +4,7 @@
|
|||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
use presence::PresencePayload;
|
||||
use disco::{Feature, Identity, DiscoInfoResult, DiscoInfoQuery};
|
||||
use data_forms::DataForm;
|
||||
use hashes::{Hash, Algo};
|
||||
|
|
@ -27,6 +28,8 @@ generate_element!(
|
|||
]
|
||||
);
|
||||
|
||||
impl PresencePayload for ECaps2 {}
|
||||
|
||||
fn compute_item(field: &str) -> Vec<u8> {
|
||||
let mut bytes = field.as_bytes().to_vec();
|
||||
bytes.push(0x1f);
|
||||
|
|
|
|||
Loading…
Reference in a new issue