Echo 351b8a719f [Glitch] Show mute end date in badge
Port 7a4945c0d3ed3550e1a22e53c03c6de646d62aec to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2026-02-06 22:47:24 +01:00

31 lines
824 B
TypeScript

import type { RecordOf } from 'immutable';
import { Record } from 'immutable';
import type { ApiRelationshipJSON } from 'flavours/glitch/api_types/relationships';
type RelationshipShape = Required<ApiRelationshipJSON>; // no changes from server shape
export type Relationship = RecordOf<RelationshipShape>;
const RelationshipFactory = Record<RelationshipShape>({
blocked_by: false,
blocking: false,
domain_blocking: false,
endorsed: false,
followed_by: false,
following: false,
id: '',
languages: null,
muting: false,
muting_notifications: false,
muting_expires_at: null,
note: '',
notifying: false,
requested_by: false,
requested: false,
showing_reblogs: false,
});
export function createRelationship(attributes: Partial<RelationshipShape>) {
return RelationshipFactory(attributes);
}