Skip to content

Commit

Permalink
fix: login not working on iOS & close #148 (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 authored Jun 5, 2023
1 parent c0fe28c commit 6dbc424
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion android/src/main/kotlin/io/agora/agorartm/AgoraRtmPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.os.Handler
import android.os.Looper
import io.agora.rtm.ErrorInfo
import io.agora.rtm.LocalInvitation
import io.agora.rtm.PeerOnlineState
import io.agora.rtm.RtmAttribute
import io.agora.rtm.RtmChannelAttribute
import io.agora.rtm.RtmChannelMember
Expand Down Expand Up @@ -276,7 +277,9 @@ class AgoraRtmPlugin : FlutterPlugin, MethodCallHandler {
peerIds,
object : Callback<Map<String, Boolean>>(result, handler) {
override fun toJson(responseInfo: Map<String, Boolean>): Any {
return responseInfo
return responseInfo.entries.associate {
it.key to if (it.value) PeerOnlineState.ONLINE else PeerOnlineState.OFFLINE
}
}
},
)
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.5.1"
version: "1.5.3"
async:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions ios/Classes/RTMClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class RTMClient: NSObject, FlutterStreamHandler, AgoraRtmDelegate {
guard let client = AgoraRtmKit(appId: appId ?? "", delegate: self) else {
throw NSError(domain: "", code: AgoraRtmLoginErrorCode.invalidAppId.rawValue)
}
self.client = client
self.call = RTMCallManager(client, clientIndex, messenger)
}

Expand Down

0 comments on commit 6dbc424

Please sign in to comment.