Skip to content

Commit

Permalink
Merge pull request #1697 from ably/fix-presence-enter-name
Browse files Browse the repository at this point in the history
Change `PresenceEnterResult` to `PresenceResult` in react hooks
  • Loading branch information
VeskeR authored Mar 15, 2024
2 parents c64732c + c32f16b commit a3389a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/react-hooks/src/hooks/usePresence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useAbly } from './useAbly.js';
import { useChannelInstance } from './useChannelInstance.js';
import { useStateErrors } from './useStateErrors.js';

export interface PresenceEnterResult<T> {
export interface PresenceResult<T> {
updateStatus: (messageOrPresenceObject: T) => void;
connectionError: Ably.ErrorInfo | null;
channelError: Ably.ErrorInfo | null;
Expand All @@ -16,7 +16,7 @@ const INACTIVE_CONNECTION_STATES: Ably.ConnectionState[] = ['suspended', 'closin
export function usePresence<T = any>(
channelNameOrNameAndOptions: ChannelParameters,
messageOrPresenceObject?: T,
): PresenceEnterResult<T> {
): PresenceResult<T> {
const params =
typeof channelNameOrNameAndOptions === 'object'
? channelNameOrNameAndOptions
Expand Down

0 comments on commit a3389a8

Please sign in to comment.