updates normalizer for proper user handling and adds support for friends tl via mastoapi
This commit is contained in:
parent
09736691ea
commit
2e59ab738b
@ -1,6 +1,5 @@
|
||||
/* eslint-env browser */
|
||||
const LOGIN_URL = '/api/account/verify_credentials.json'
|
||||
const FRIENDS_TIMELINE_URL = '/api/statuses/friends_timeline.json'
|
||||
const ALL_FOLLOWING_URL = '/api/qvitter/allfollowing'
|
||||
const PUBLIC_TIMELINE_URL = '/api/statuses/public_timeline.json'
|
||||
const PUBLIC_AND_EXTERNAL_TIMELINE_URL = '/api/statuses/public_and_external_timeline.json'
|
||||
@ -43,6 +42,7 @@ const DENY_USER_URL = '/api/pleroma/friendships/deny'
|
||||
const SUGGESTIONS_URL = '/api/v1/suggestions'
|
||||
|
||||
const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites'
|
||||
const MASTODON_USER_HOME_TIMELINE_URL = '/api/v1/timelines/home'
|
||||
|
||||
import { each, map } from 'lodash'
|
||||
import { parseStatus, parseUser, parseNotification } from '../entity_normalizer/entity_normalizer.service.js'
|
||||
@ -342,7 +342,7 @@ const setUserMute = ({id, credentials, muted = true}) => {
|
||||
const fetchTimeline = ({timeline, credentials, since = false, until = false, userId = false, tag = false}) => {
|
||||
const timelineUrls = {
|
||||
public: PUBLIC_TIMELINE_URL,
|
||||
friends: FRIENDS_TIMELINE_URL,
|
||||
friends: MASTODON_USER_HOME_TIMELINE_URL,
|
||||
mentions: MENTIONS_URL,
|
||||
dms: DM_TIMELINE_URL,
|
||||
notifications: QVITTER_USER_NOTIFICATIONS_URL,
|
||||
|
@ -60,9 +60,18 @@ export const parseUser = (data) => {
|
||||
|
||||
if (data.pleroma) {
|
||||
const pleroma = data.pleroma
|
||||
output.follows_you = pleroma.follows_you
|
||||
output.statusnet_blocking = pleroma.statusnet_blocking
|
||||
output.muted = pleroma.muted
|
||||
const relationship = pleroma.relationship
|
||||
output.follows_you = relationship.followed_by
|
||||
output.statusnet_blocking = relationship.blocking
|
||||
output.muted = relationship.muting
|
||||
output.following = relationship.following
|
||||
|
||||
// Unused:
|
||||
// domain_blocking
|
||||
// endorsed
|
||||
// muting_notifications
|
||||
// requested
|
||||
// showing_reblogs
|
||||
}
|
||||
|
||||
// Missing, trying to recover
|
||||
|
Loading…
Reference in New Issue
Block a user