Add fep-e232 feature flag
This commit is contained in:
parent
773c36f3df
commit
1637e38ee4
3 changed files with 10 additions and 3 deletions
|
@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added `fep-e232` feature flag (disabled by default).
|
||||||
|
|
||||||
## [1.17.0] - 2023-03-15
|
## [1.17.0] - 2023-03-15
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -97,5 +97,6 @@ serial_test = "0.7.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
ethereum-extras = []
|
ethereum-extras = []
|
||||||
|
fep-e232 = []
|
||||||
|
|
||||||
production = ["mitra-config/production"]
|
production = ["mitra-config/production"]
|
||||||
|
|
|
@ -157,15 +157,17 @@ pub fn build_note(
|
||||||
assert_eq!(post.links.len(), post.linked.len());
|
assert_eq!(post.links.len(), post.linked.len());
|
||||||
for linked in &post.linked {
|
for linked in &post.linked {
|
||||||
// Build FEP-e232 object link
|
// Build FEP-e232 object link
|
||||||
|
// https://codeberg.org/fediverse/fep/src/branch/main/feps/fep-e232.md
|
||||||
let link_href = linked.object_id(instance_url);
|
let link_href = linked.object_id(instance_url);
|
||||||
let _tag = LinkTag {
|
let tag = LinkTag {
|
||||||
name: None, // no microsyntax
|
name: None, // no microsyntax
|
||||||
tag_type: LINK.to_string(),
|
tag_type: LINK.to_string(),
|
||||||
href: link_href,
|
href: link_href,
|
||||||
media_type: AP_MEDIA_TYPE.to_string(),
|
media_type: AP_MEDIA_TYPE.to_string(),
|
||||||
};
|
};
|
||||||
// TODO: fix tag processing bug in Pleroma
|
if cfg!(feature = "fep-e232") {
|
||||||
// tags.push(Tag::LinkTag(tag));
|
tags.push(Tag::LinkTag(tag));
|
||||||
|
};
|
||||||
};
|
};
|
||||||
let maybe_quote_url = post.linked.get(0)
|
let maybe_quote_url = post.linked.get(0)
|
||||||
.map(|linked| linked.object_id(instance_url));
|
.map(|linked| linked.object_id(instance_url));
|
||||||
|
|
Loading…
Reference in a new issue