Skip to content

Commit

Permalink
Merge pull request #95 from jpush/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
JoshLipan committed Dec 13, 2018
2 parents b166833 + 5ab8bac commit 0aded82
Show file tree
Hide file tree
Showing 32 changed files with 957 additions and 159 deletions.
10 changes: 5 additions & 5 deletions ionic/example/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,12 @@
<allow-navigation href="http://192.168.11.141:8100" />
<allow-navigation href="http://192.168.8.167:8100" />
<allow-navigation href="http://192.168.8.222:8100" />
<allow-navigation href="http://192.168.10.171:8100" />
<allow-navigation href="http://192.168.8.18:8100" />
<engine name="android" spec="^7.0.0" />
<engine name="ios" spec="^4.5.4" />
<plugin name="cordova-plugin-camera" spec="^4.0.3" />
<plugin name="cordova-plugin-device" spec="^1.1.4" />
<plugin name="cordova-plugin-device" spec="^2.0.2" />
<plugin name="cordova-plugin-file" spec="^6.0.1" />
<plugin name="cordova-plugin-ionic-webview" spec="^1.2.1" />
<plugin name="cordova-plugin-media" spec="^5.0.2">
Expand All @@ -100,10 +103,7 @@
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<engine name="android" spec="~7.0.0" />
<plugin name="jmessage-phonegap-plugin" spec="/Users/HuminiOS/Desktop/workproject/jmessage-phonegap-plugin">
<plugin name="jmessage-phonegap-plugin" spec="file:///Users/HuminiOS/Desktop/workproject/jmessage-phonegap-plugin">
<variable name="APP_KEY" value="a1703c14b186a68a66ef86c1" />
</plugin>
<allow-navigation href="http://192.168.10.171:8100" />
<allow-navigation href="http://192.168.8.18:8100" />
</widget>
7 changes: 3 additions & 4 deletions ionic/example/ionic.config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "jmessageIonic",
"app_id": "",
"type": "ionic-angular",
"integrations": {
"cordova": {}
}
}
},
"type": "ionic-angular"
}
6 changes: 3 additions & 3 deletions ionic/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@
"cordova-android": "^7.0.0",
"cordova-ios": "^4.5.4",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-jcore": "^1.2.0",
"cordova-plugin-jcore": "^1.2.6",
"cordova-plugin-media": "^5.0.2",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-whitelist": "^1.3.1",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"jmessage-phonegap-plugin": "3.4.7",
"jmessage-phonegap-plugin": "file:///Users/HuminiOS/Desktop/workproject/jmessage-phonegap-plugin",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
Expand Down
52 changes: 51 additions & 1 deletion ionic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ export interface JMUserInfo {
extras?: { [key: string]: string; }; // 自定义键值对
};

export interface JMGroupMemberInfo {
user: JMUserInfo; // 群用户详情
groupNickname: string; // 用户的群昵称
memberType: 'owner' | 'admin' | 'ordinary'; // 用户类型
joinGroupTime: number; // 用户入群时间(单位:毫秒)
}

export interface JMGroupInfo {
type: 'group';
id: string; // 群组 id
Expand Down Expand Up @@ -613,7 +620,7 @@ export class JMessagePlugin extends IonicNativePlugin {
@Cordova()
getGroupMembers(params: {
id: string;
}): Promise<any> {
}): Promise<JMGroupMemberInfo[]> {
return;
}

Expand Down Expand Up @@ -762,7 +769,50 @@ export class JMessagePlugin extends IonicNativePlugin {
return;
}

@Cordova()
transferGroupOwner(params: {
groupId: string;
username: string;
appKey?: string;
}): Promise<any> {
return;
}

@Cordova()
setGroupMemberSilence(params: {
groupId: string;
isSilence: boolean;
username: string;
appKey?: string;
}): Promise<any> {
return;
}

@Cordova()
isSilenceMember(params: {
groupId: string;
username: string;
appKey?: string;
}): Promise<any> {
return;
}

@Cordova()
groupSilenceMembers(params: {
groupId: string;
}): Promise<any> {
return;
}

@Cordova()
setGroupNickname(params: {
groupId: string;
nickName: string;
username: string;
appKey?: string;
}): Promise<any> {
return;
}

/**
* TODO:
Expand Down
33 changes: 32 additions & 1 deletion ionic/jmessage/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ export interface JMUserInfo {
[key: string]: string;
};
}
export interface JMGroupMemberInfo {
user: JMUserInfo;
groupNickname: string;
memberType: 'owner' | 'admin' | 'ordinary';
joinGroupTime: number;
}
export interface JMGroupInfo {
type: 'group';
id: string;
Expand Down Expand Up @@ -403,7 +409,7 @@ export declare class JMessagePlugin extends IonicNativePlugin {
}): Promise<any>;
getGroupMembers(params: {
id: string;
}): Promise<any>;
}): Promise<JMGroupMemberInfo[]>;
addUsersToBlacklist(params: {
usernameArray: string[];
appKey?: string;
Expand Down Expand Up @@ -456,6 +462,31 @@ export declare class JMessagePlugin extends IonicNativePlugin {
getConversation(params: JMAllType): Promise<any>;
getConversations(): Promise<any>;
resetUnreadMessageCount(params: JMAllType): Promise<any>;
transferGroupOwner(params: {
groupId: string;
username: string;
appKey?: string;
}): Promise<any>;
setGroupMemberSilence(params: {
groupId: string;
isSilence: boolean;
username: string;
appKey?: string;
}): Promise<any>;
isSilenceMember(params: {
groupId: string;
username: string;
appKey?: string;
}): Promise<any>;
groupSilenceMembers(params: {
groupId: string;
}): Promise<any>;
setGroupNickname(params: {
groupId: string;
nickName: string;
username: string;
appKey?: string;
}): Promise<any>;
/**
* TODO:
*
Expand Down
45 changes: 45 additions & 0 deletions ionic/jmessage/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ionic/jmessage/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ionic/jmessage/index.metadata.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions ionic/jmessage/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jiguang-ionic/jmessage",
"version": "4.7.0",
"version": "2.0.0",
"description": "Ionic Native - Native plugins for ionic apps",
"module": "index.js",
"typings": "index.d.ts",
Expand All @@ -9,7 +9,8 @@
"peerDependencies": {
"@ionic-native/core": "^4.2.0",
"@angular/core": "*",
"rxjs": "^5.0.1"
"rxjs": "^5.0.1",
"jmessage-phonegap-plugin": ">= 4.0.0"
},
"repository": {
"type": "git",
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": "jmessage-phonegap-plugin",
"version": "3.6.0",
"version": "4.0.1",
"description": "JMessage Cordova Plugin.",
"cordova": {
"id": "jmessage-phonegap-plugin",
Expand Down
5 changes: 3 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="jmessage-phonegap-plugin"
version="3.6.0">
version="4.0.1">

<name>JMessage</name>
<description>集成极光 IM 和推送功能</description>
Expand All @@ -11,6 +11,7 @@
<license>Apache 2.0 License</license>

<preference name="APP_KEY" />
<preference name="CHANNEL" default="developer-default" />

<!-- dependencies -->
<dependency id="cordova-plugin-device" />
Expand Down Expand Up @@ -157,7 +158,7 @@
android:exported="false" />

<meta-data android:name="JPUSH_APPKEY" android:value="$APP_KEY"/>
<meta-data android:name="JPUSH_CHANNEL" android:value="developer-default"/>
<meta-data android:name="JPUSH_CHANNEL" android:value="$CHANNEL"/>
</config-file>

<lib-file src="src/android/libs/jmessage-sdk-android-2.7.1.jar" />
Expand Down
Loading

0 comments on commit 0aded82

Please sign in to comment.