Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: juzibot/wechaty-grpc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: wechaty/grpc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 7 commits
  • 16 files changed
  • 2 contributors

Commits on Jun 14, 2023

  1. Update README.md (wechaty#184)

    kunl authored Jun 14, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8d71b17 View commit details

Commits on Jun 27, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7529560 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a5f98f0 View commit details
  3. Feat/conversation read wechaty (wechaty#188)

    * feat: 🎸 conversation read mark
    
    * 1.5.3
    
    * fix: 🐛 naming
    hcfw007 authored Jun 27, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    db2ee84 View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    349dfea View commit details

Commits on Jun 29, 2023

  1. [WIP] fix ci and lint (wechaty#199)

    * fix: 🐛 upgarde go for one dependency requires 1.18
    
    * 1.5.4
    hcfw007 authored Jun 29, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1099c01 View commit details

Commits on Jul 27, 2023

  1. Fix CI (wechaty#201)

    * fix: 🐛 tsconfig
    
    * fix: 🐛 google api proto path
    
    * fix: 🐛 version condition
    
    * fix: 🐛 version condition
    hcfw007 authored Jul 27, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f1ecd6c View commit details
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
id: go
- name: Install Protoc
uses: arduino/setup-protoc@v1
@@ -52,7 +52,7 @@ jobs:
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Check out code into the Go module directory
6 changes: 3 additions & 3 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- name: Install Protoc
uses: arduino/setup-protoc@v1

@@ -54,7 +54,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- name: Install Protoc
uses: arduino/setup-protoc@v1
@@ -86,7 +86,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Install Protoc 3rd party protos
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
id: go
- name: Install Dependencies
run: |
6 changes: 3 additions & 3 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- uses: actions/cache@master
with:
path: ~/.cache/pip
@@ -62,7 +62,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- uses: actions/cache@master
with:
@@ -103,7 +103,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- uses: actions/cache@master
with:
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -128,7 +128,7 @@ compile 'io.github.wechaty:grpc:0.11.25'

### PHP

[github.com/wechaty/php-grpc](https://github.comwechaty/php-grpc)
[github.com/wechaty/php-grpc](https://github.com/wechaty/php-grpc)

**Maintainer:**

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wechaty-grpc",
"version": "1.5.2",
"version": "1.5.4",
"description": "gRPC for Wechaty",
"type": "module",
"exports": {
13 changes: 13 additions & 0 deletions proto/wechaty/puppet.proto
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ import "wechaty/puppet/room-invitation.proto";
import "wechaty/puppet/room-member.proto";
import "wechaty/puppet/room.proto";
import "wechaty/puppet/tag.proto";
import "wechaty/puppet/conversation.proto";

option java_package="io.github.wechaty.grpc";
option go_package="github.com/wechaty/go-grpc/wechaty";
@@ -358,6 +359,18 @@ service Puppet {
};
}

/**
*
* Conversation
*
*/
rpc ConversationRead (puppet.ConversationReadRequest) returns (puppet.ConversationReadResponse) {
option (google.api.http) = {
put: "/conversation/{conversation_id}/read"
body: "*"
};
}

/**
*
* Room
15 changes: 15 additions & 0 deletions proto/wechaty/puppet/conversation.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
syntax = "proto3";
package wechaty.puppet;

option go_package="github.com/wechaty/go-grpc/wechaty/puppet";
option java_package="io.github.wechaty.grpc.puppet";
option csharp_namespace = "github.wechaty.grpc.puppet";

message ConversationReadRequest {
string conversation_id = 1;
bool has_read = 2;
}

message ConversationReadResponse {
bool has_read = 1;
}
2 changes: 2 additions & 0 deletions proto/wechaty/puppet/event.proto
Original file line number Diff line number Diff line change
@@ -27,6 +27,8 @@ enum EventType {
EVENT_TYPE_LOGIN = 25;
EVENT_TYPE_LOGOUT = 26;
EVENT_TYPE_DIRTY = 27;

EVENT_TYPE_ROOM_ANNOUNCE = 32;
}

message EventRequest {}
4 changes: 4 additions & 0 deletions proto/wechaty/puppet/message.proto
Original file line number Diff line number Diff line change
@@ -36,6 +36,10 @@ enum MessageType {
MESSAGE_TYPE_RED_ENVELOPE = 12;
MESSAGE_TYPE_RECALLED = 13;
MESSAGE_TYPE_URL = 14;
MESSAGE_TYPE_GROUP_NOTE = 15;
MESSAGE_TYPE_POST = 16;

MESSAGE_TYPE_SYSTEM = 18;
}

message MessagePayloadRequest {
6 changes: 4 additions & 2 deletions proto/wechaty/puppet/room.proto
Original file line number Diff line number Diff line change
@@ -27,8 +27,9 @@ message RoomPayloadResponse {

message RoomAddRequest {
string id = 1;
string contact_id = 2;
string contact_id = 2 [deprecated = true];
bool invite_only = 3;
repeated string contact_ids = 4;
}
message RoomAddResponse {}

@@ -49,7 +50,8 @@ message RoomCreateResponse {

message RoomDelRequest {
string id = 1;
string contact_id = 2;
string contact_id = 2 [deprecated = true];
repeated string contact_ids = 3;
}
message RoomDelResponse {}

10 changes: 3 additions & 7 deletions scripts/install-protoc.sh
Original file line number Diff line number Diff line change
@@ -32,14 +32,10 @@ function check_protoc_version () {
majorVer=$(echo $protocVersion | cut -d. -f 1)
minorVer=$(echo $protocVersion | cut -d. -f 2)

(($majorVer == 3)) || {
echo "protoc major version must >= 3 (the installed version is $protocVersion)"
exit 1
}

# https://github.com/wechaty/grpc/issues/109
(($minorVer >= 17)) || {
echo "protoc minor version must >= 17 (the installed version is $protocVersion)"

((($majorVer == 3 && $minorVer >= 17) || $majorVer > 3)) || {
echo "protoc version must >= 3.17 (the installed version is $protocVersion)"
exit 1
}

6 changes: 6 additions & 0 deletions tests/puppet-server-impl.ts
Original file line number Diff line number Diff line change
@@ -373,4 +373,10 @@ export const puppetServerImpl: IPuppetServer = {
throw new Error('not implemented.')
},

conversationRead: (call, callback) => {
void call
void callback
throw new Error('not implemented.')
},

}
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -2,6 +2,9 @@
"extends": "@chatie/tsconfig",
"compilerOptions": {
"outDir": "dist/esm",
"verbatimModuleSyntax": false,
// See: https://github.com/wechaty/wechaty/issues/2551
"ignoreDeprecations": "5.0"
},
"exclude": [
"node_modules/",