AgoraIO/agora-react-native-rtm

acceptRemoteInvitationV2 fails on iOS

ShelbyIB opened this issue · 0 comments

Hi. I am using "agora-react-native-rtm": "^1.5.1" and I get
Caller

LocalInvitationFailure:
{"calleeId": "ios", "channelId": "friends", "content": "my content", "hash": 55201274, "response": "", "state": 6}

Callee

RemoteInvitationFailure
{"content":"my content", "hash":10790526560,"callerId":"android","state":6,"channelId":"friends"}

with ios. There is already an issue #74 related to this but it has been closed with the answer,
change remote hash to 0.
But I wonder how to change the hash since hash value is read only in both remote and local invitations.

export interface LocalInvitation{
 readonly calleeId: string;
 content?: string;
 channelId?: string;
 readonly response?: string;
 readonly state?: LocalInvitationState;
 readonly hash: number;
}

export interface RemoteInvitation {
  readonly callerId: string;
  readonly content?: string;
  readonly channelId?: string;
  response?: string;
  readonly state?: RemoteInvitationState;
  readonly hash: number;
}

Also I tried changing the invitation hash to 0 as follows and it works but it seems not be an answer it's a workaround only.
let newInvitation = {...invitation, hash: 0};

Seems this needs to be fixed in future version.

Note that this happens with ios only. My device os version -iOS 16.2