Skip to content

Commit

Permalink
0.8.2 (#121)
Browse files Browse the repository at this point in the history
* [Feature] v11 지원 및 다크모드 지원 (#115)

* [Feature] v11 지원 및 다크모드 지원

* [Fix] 리뷰반영

* [Fix] isAppearance 삭제 후 toAppearance에 합침

* 0.8.1 (#118)

* Android - 11.1.0 and ChannelButtonIcon

* iOS - ChannelButtonIcon

* 0.8.1

* [Fix] 리뷰반영

* 0.8.2 (#120)
  • Loading branch information
zoyi-jin authored Jan 23, 2024
1 parent 0b214e0 commit 1ec2735
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.8.2

## Update
* support android channel-io 11.2.2
* support openSupportBot

# 0.8.1

## Update
Expand Down
4 changes: 2 additions & 2 deletions RNChannelIO.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RNChannelIO"
s.version = "0.2.1"
s.version = "0.2.2"
s.summary = "RNChannelIO"
s.description = "channel plugin for react native"
s.homepage = "https://channel.io"
Expand All @@ -15,5 +15,5 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '11.0'

s.dependency "React"
s.dependency "ChannelIOSDK", '~> 11'
s.dependency "ChannelIOSDK", '~> 11.2'
end
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ repositories {

dependencies {
implementation 'com.facebook.react:react-native'
api 'io.channel:plugin-android:11.1.0'
api 'io.channel:plugin-android:11.2.2'
}
5 changes: 5 additions & 0 deletions android/src/main/java/com/zoyi/channel/rn/RNChannelIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ public void openChat(String chatId, String message) {
ChannelIO.openChat(getCurrentActivity(), chatId, message);
}

@ReactMethod
public void openSupportBot(String supportBotId, String message) {
ChannelIO.openSupportBot(getCurrentActivity(), supportBotId, message);
}

@ReactMethod
public void track(String name, ReadableMap eventProperty) {
ChannelIO.track(name, ParseUtils.toHashMap(eventProperty));
Expand Down
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ export const ChannelIO = {
}
},

/**
* Opens User chat to run a specific Support bot.
* @param {String} supportBotId This is the support bot's ID. If supportBotId is invalid or nil, the chat room is closed.
* @param {String} message This message will be displayed in the input field after completing the support bot operation.
*/
openSupportBot: (supportBotId, message) => {
ChannelModule.openSupportBot(supportBotId, message);
},

/**
* Send a event
* @param {String} eventName event name
Expand Down
4 changes: 4 additions & 0 deletions ios/RNChannelIO.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ - (NSDictionary *)constantsToExport {
[ChannelIO openChatWith:chatId message:payload];
}

RCT_EXPORT_METHOD(openSupportBot:(NSString *)supportBotId message:(NSString *)message) {
[ChannelIO openSupportBotWith:supportBotId message:message];
}

RCT_EXPORT_METHOD(track:(NSString *)name eventProperty:(NSDictionary *)properties) {
[ChannelIO trackWithEventName:name eventProperty:properties];
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-channel-plugin",
"version": "0.8.1",
"version": "0.8.2",
"description": "react native module for channel io",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 1ec2735

Please sign in to comment.