add webhooks (#1465)

* add callback before join group

* fix bug

* fix deployments/templates/alertmanager.yml

* fix bug

* update callback after join group

* merge callback after join group

* update callback setrgoup info

* test

* test

* test

* update three functions in friend category

* test friend and blacklist

* test

* test

* test

* Update openim.yaml

* merge callback after join group

* merge callback after join group

* merge callback after join group

* fix callbackbeforesetgroupinfo

* fix eventtime

* update api request required

* update api request required

* update api request required

* delete unused code

* delete unused code

* fix

* Update .env

* Update .env

* Update callback.go

* Update callback.go

* Update .env

* Update .env

* fix: merge

* update

* fix: merge

* fix: fix bugs

* update callback enable

* update callback enable

* update callback enable

* update callback enable

* update callback enable

* update callback enable

* Update openim.yaml

* Update environment.sh

* Update environment.md

* Update environment.md

* Update environment.sh

---------

Co-authored-by: Gordon <1432970085@qq.com>
This commit is contained in:
AndrewZuo01
2023-11-30 10:10:48 +08:00
committed by GitHub
parent 35bac04f58
commit 0efc235f45
27 changed files with 644 additions and 155 deletions
+69 -50
View File
@@ -109,56 +109,6 @@ type CallbackAfterSetGroupMemberInfoResp struct {
CommonCallbackResp
}
type CallbackAfterGroupMemberExitReq struct {
CallbackCommand `json:"callbackCommand"`
GroupID string `json:"groupID"`
UserID string `json:"userID"`
GroupType *int32 `json:"groupType"`
ExitType string `json:"exitType"`
}
type CallbackAfterGroupMemberExitResp struct {
CommonCallbackResp
}
type CallbackAfterUngroupReq struct {
CallbackCommand `json:"callbackCommand"`
GroupID string `json:"groupID"`
GroupType *int32 `json:"groupType"`
OwnerID string `json:"ownerID"`
MemberList []string `json:"memberList"`
}
type CallbackAfterUngroupResp struct {
CommonCallbackResp
}
type CallbackAfterSetGroupInfoReq struct {
CallbackCommand `json:"callbackCommand"`
GroupID string `json:"groupID"`
GroupType *int32 `json:"groupType"`
UserID string `json:"userID"`
Name string `json:"name"`
Notification string `json:"notification"`
GroupUrl string `json:"groupUrl"`
}
type CallbackAfterSetGroupInfoResp struct {
CommonCallbackResp
}
type CallbackAfterRevokeMsgReq struct {
CallbackCommand `json:"callbackCommand"`
GroupID string `json:"groupID"`
GroupType *int32 `json:"groupType"`
UserID string `json:"userID"`
Content string `json:"content"`
}
type CallbackAfterRevokeMsgResp struct {
CommonCallbackResp
}
type CallbackQuitGroupReq struct {
CallbackCommand `json:"callbackCommand"`
GroupID string `json:"groupID"`
@@ -214,3 +164,72 @@ type CallbackTransferGroupOwnerReq struct {
type CallbackTransferGroupOwnerResp struct {
CommonCallbackResp
}
type CallbackBeforeInviteUserToGroupReq struct {
CallbackCommand `json:"callbackCommand"`
OperationID string `json:"operationID"`
GroupID string `json:"groupID"`
Reason string `json:"reason"`
InvitedUserIDs []string `json:"invitedUserIDs"`
}
type CallbackBeforeInviteUserToGroupResp struct {
CommonCallbackResp
RefusedMembersAccount []string `json:"refusedMembersAccount,omitempty"` // Optional field to list members whose invitation is refused.
}
type CallbackAfterJoinGroupReq struct {
CallbackCommand `json:"callbackCommand"`
OperationID string `json:"operationID"`
GroupID string `json:"groupID"`
ReqMessage string `json:"reqMessage"`
JoinSource int32 `json:"joinSource"`
InviterUserID string `json:"inviterUserID"`
}
type CallbackAfterJoinGroupResp struct {
CommonCallbackResp
}
type CallbackBeforeSetGroupInfoReq struct {
CallbackCommand `json:"callbackCommand"`
OperationID string `json:"operationID"`
GroupID string `json:"groupID"`
GroupName string `json:"groupName"`
Notification string `json:"notification"`
Introduction string `json:"introduction"`
FaceURL string `json:"faceURL"`
Ex string `json:"ex"`
NeedVerification int32 `json:"needVerification"`
LookMemberInfo int32 `json:"lookMemberInfo"`
ApplyMemberFriend int32 `json:"applyMemberFriend"`
}
type CallbackBeforeSetGroupInfoResp struct {
CommonCallbackResp
GroupID string ` json:"groupID"`
GroupName string `json:"groupName"`
Notification string `json:"notification"`
Introduction string `json:"introduction"`
FaceURL string `json:"faceURL"`
Ex *string `json:"ex"`
NeedVerification *int32 `json:"needVerification"`
LookMemberInfo *int32 `json:"lookMemberInfo"`
ApplyMemberFriend *int32 `json:"applyMemberFriend"`
}
type CallbackAfterSetGroupInfoReq struct {
CallbackCommand `json:"callbackCommand"`
OperationID string `json:"operationID"`
GroupID string `json:"groupID"`
GroupName string `json:"groupName"`
Notification string `json:"notification"`
Introduction string `json:"introduction"`
FaceURL string `json:"faceURL"`
Ex *string `json:"ex"`
NeedVerification *int32 `json:"needVerification"`
LookMemberInfo *int32 `json:"lookMemberInfo"`
ApplyMemberFriend *int32 `json:"applyMemberFriend"`
}
type CallbackAfterSetGroupInfoResp struct {
CommonCallbackResp
}