Implement Talk has read federation (#5636)
* Talk read * fix * 複数のRead ActivityはCollectionとして送るように * あ
This commit is contained in:
parent
648be3005f
commit
3e85aad80a
12 changed files with 108 additions and 10 deletions
|
|
@ -6,7 +6,7 @@
|
|||
* @param last URL of last page (optional)
|
||||
* @param orderedItems attached objects (optional)
|
||||
*/
|
||||
export default function(id: string, totalItems: any, first?: string, last?: string, orderedItems?: object) {
|
||||
export default function(id: string | null, totalItems: any, first?: string, last?: string, orderedItems?: object) {
|
||||
const page: any = {
|
||||
id,
|
||||
type: 'OrderedCollection',
|
||||
|
|
|
|||
9
src/remote/activitypub/renderer/read.ts
Normal file
9
src/remote/activitypub/renderer/read.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import config from '../../../config';
|
||||
import { ILocalUser } from '../../../models/entities/user';
|
||||
import { MessagingMessage } from '../../../models/entities/messaging-message';
|
||||
|
||||
export const renderReadActivity = (user: ILocalUser, message: MessagingMessage) => ({
|
||||
type: 'Read',
|
||||
actor: `${config.url}/users/${user.id}`,
|
||||
object: message.uri
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue