Skip to content

Commit

Permalink
Re-export Fedify vocab classes
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlia committed Jan 9, 2025
1 parent cb4b124 commit cf7c7be
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/message-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import type { KvKey } from "@fedify/fedify/federation";
import { LanguageString } from "@fedify/fedify/runtime";
import {
type Actor,
Announce,
Expand All @@ -23,16 +25,14 @@ import {
Document,
Hashtag,
isActor,
type KvKey,
LanguageString,
Mention,
Note,
type Object,
PUBLIC_COLLECTION,
Question,
Tombstone,
Undo,
} from "@fedify/fedify";
} from "@fedify/fedify/vocab";
import type { LanguageTag } from "@phensley/language-tag";
import { unescape } from "@std/html/entities";
import { generate as uuidv7 } from "@std/uuid/unstable-v7";
Expand Down
17 changes: 16 additions & 1 deletion src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,20 @@ import type {
SessionPublishOptionsWithClass,
} from "./session.ts";
import type { Text } from "./text.ts";
export { Article, ChatMessage, Note, Question } from "@fedify/fedify/vocab";
export {
Article,
Audio,
ChatMessage,
Document,
Hashtag,
Image,
isActor,
Note,
Question,
Video,
} from "@fedify/fedify/vocab";
export type { Actor } from "@fedify/fedify/vocab";
export { LanguageTag, parseLanguageTag } from "@phensley/language-tag";

/**
* A possible message class.
Expand Down Expand Up @@ -62,6 +75,8 @@ export type MessageVisibility =
| "direct"
/**
* Signifies that the message is unknown; it is not clear who can see it.
* It is usually the case when the message is published by a minor fediverse
* server that is incompatible with Mastodon-style visibility.
*/
| "unknown";

Expand Down
25 changes: 14 additions & 11 deletions src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
export {
type Actor,
Audio,
Document,
Image,
isActor,
Video,
} from "@fedify/fedify/vocab";
export {
Application,
type Bot,
Expand All @@ -34,15 +26,26 @@ export {
type Software,
} from "./bot.ts";
export type * from "./events.ts";
export type {
export {
Article,
Audio,
ChatMessage,
Document,
Hashtag,
Image,
isActor,
LanguageTag,
Note,
parseLanguageTag,
Question,
Video,
} from "./message.ts";
export type {
Actor,
Message,
MessageClass,
MessageShareOptions,
MessageVisibility,
Note,
Question,
SharedMessage,
} from "./message.ts";
export type {
Expand Down

0 comments on commit cf7c7be

Please sign in to comment.