mirror of
https://github.com/spacebarchat/server.git
synced 2026-06-04 23:51:46 +00:00
test
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import type { APNote } from "activitypub-types";
|
||||
import type { APAnnounce, APNote } from "activitypub-types";
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
@@ -243,6 +243,19 @@ export class Message extends BaseClass {
|
||||
};
|
||||
}
|
||||
|
||||
toAnnounceAP(): APAnnounce {
|
||||
const { webDomain } = Config.get().federation;
|
||||
|
||||
return {
|
||||
id: `https://${webDomain}/fed/channel/${this.channel_id}/messages/${this.id}`,
|
||||
type: "Announce",
|
||||
actor: `https://${webDomain}/fed/user/${this.author_id}`,
|
||||
published: this.timestamp,
|
||||
to: `https://${webDomain}/fed/channel/${this.channel_id}`,
|
||||
object: this.toAP(),
|
||||
};
|
||||
}
|
||||
|
||||
toAP(): APNote {
|
||||
const { webDomain } = Config.get().federation;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user