Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
Merge #25 修改Event里变量的对象可见性
Browse files Browse the repository at this point in the history
修改Event里变量的对象可见性
  • Loading branch information
hykilpikonna authored Nov 30, 2019
2 parents 21c259b + a90fc87 commit abd7c9b
Show file tree
Hide file tree
Showing 18 changed files with 72 additions and 55 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Java CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml
6 changes: 3 additions & 3 deletions src/main/java/cc/moecraft/icq/event/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ public abstract class Event implements ContentComparable
{
@SerializedName("post_type")
@Expose
public String postType;
protected String postType;

@SerializedName("self_id")
@Expose
public Long selfId;

@SerializedName("time")
@Expose
public Long time;
protected Long time;

public PicqBotX bot;
protected PicqBotX bot;

public Event setBot(PicqBotX bot)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
@NoArgsConstructor
public abstract class EventLocal extends Event
{
public boolean cancelled = false;
}
protected boolean cancelled = false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@AllArgsConstructor
public class EventLocalHttpFail extends EventLocal
{
public Reason fail; // 怎样失败的
protected Reason fail; // 怎样失败的

public enum Reason
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
@Data
public class EventLocalHttpReceive extends EventLocal
{
public String[] info;
protected String[] info;

public ArrayList<String> otherInfo;
protected ArrayList<String> otherInfo;

public String contentType;
protected String contentType;

public String charset;
protected String charset;

public String userAgent;
protected String userAgent;

public String data;
protected String data;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
@Data
public class EventLocalSendMessage extends EventLocal
{
public long id;
protected long id;

public String message;
protected String message;

public boolean autoEscape = false;
protected boolean autoEscape = false;

public EventLocalSendMessage(long id, String message)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class EventDiscussMessage extends EventGroupOrDiscussMessage
{
@SerializedName("discuss_id")
@Expose
public Long discussId;
protected Long discussId;

@Override
public ReturnData<RMessageReturnData> respond(String message, boolean raw)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ public class EventGroupMessage extends EventGroupOrDiscussMessage
{
@SerializedName("anonymous")
@Expose
public Anonymous anonymous;
protected Anonymous anonymous;

@SerializedName("group_id")
@Expose
public Long groupId;
protected Long groupId;

@SerializedName("sub_type")
@Expose
public String subType;
protected String subType;

@Data
@Setter(AccessLevel.NONE)
public class Anonymous
{
@SerializedName("flag")
@Expose
public String flag;
protected String flag;

@SerializedName("id")
@Expose
public Long id;
protected Long id;

@SerializedName("name")
@Expose
public String name;
protected String name;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@ public abstract class EventMessage extends Event
{
@SerializedName("message_type")
@Expose
public String messageType;
protected String messageType;

@SerializedName("font")
@Expose
public Long font;
protected Long font;

@SerializedName("message")
@Expose
public String message;

@SerializedName("message_id")
@Expose
public Long messageId;
protected Long messageId;

@SerializedName("raw_message")
@Expose
public String rawMessage;
protected String rawMessage;

@SerializedName("user_id")
@Expose
public Long senderId;
protected Long senderId;

/**
* 回复消息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class EventPrivateMessage extends EventMessage
{
@SerializedName("sub_type")
@Expose
public String subType;
protected String subType;

@Override
public ReturnData<RMessageReturnData> respond(String message, boolean raw)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public class EventNotice extends Event
{
@SerializedName("notice_type")
@Expose
public String noticeType;
protected String noticeType;

@SerializedName("user_id")
@Expose
public Long userId;
protected Long userId;

@Override
public boolean contentEquals(Object o)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ public class EventNoticeGroupBan extends EventNotice
{
@SerializedName("sub_type")
@Expose
public BanType type;
protected BanType type;

@SerializedName("group_id")
@Expose
public Long groupId;
protected Long groupId;

@SerializedName("operator_id")
@Expose
public Long operatorId;
protected Long operatorId;

@SerializedName("user_id")
@Expose
public Long userId;
protected Long userId;

@SerializedName("duration")
@Expose
public Long duration;
protected Long duration;

public enum BanType
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@ public class EventNoticeGroupUpload extends EventNotice
{
@SerializedName("file")
@Expose
public File file;
protected File file;

@SerializedName("group_id")
@Expose
public Long groupId;
protected Long groupId;

@Data
@Setter(AccessLevel.NONE)
public class File
{
@SerializedName("busid")
@Expose
public Long busid;
protected Long busid;

@SerializedName("id")
@Expose
public String id;
protected String id;

@SerializedName("name")
@Expose
public String name;
protected String name;

@SerializedName("size")
@Expose
public Long size;
protected Long size;
}

private GroupEventMethods groupMethods = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ public class EventNoticeGroupAdminChange extends EventNotice
{
@SerializedName("group_id")
@Expose
public Long groupId;
protected Long groupId;

@SerializedName("sub_type")
@Expose
public String subType;
protected String subType;

private GroupEventMethods groupMethods = null;
protected GroupEventMethods groupMethods = null;

@Override
public boolean contentEquals(Object o)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ public class EventNoticeGroupMemberChange extends EventNotice
{
@SerializedName("group_id")
@Expose
public Long groupId;
protected Long groupId;

@SerializedName("operator_id")
@Expose
public Long operatorId;
protected Long operatorId;

@SerializedName("sub_type")
@Expose
public String subType;
protected String subType;

private GroupEventMethods groupMethods = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public class EventGroupAddRequest extends EventRequest
{
@SerializedName("group_id")
@Expose
public Long groupId;
protected Long groupId;

@SerializedName("sub_type")
@Expose
public String subType;
protected String subType;

@Override
public void accept()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public class EventGroupInviteRequest extends EventRequest
{
@SerializedName("group_id")
@Expose
public Long groupId;
protected Long groupId;

@SerializedName("sub_type")
@Expose
public String subType;
protected String subType;

@Override
public void accept()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ public abstract class EventRequest extends Event
{
@SerializedName("request_type")
@Expose
public String requestType;
protected String requestType;

@SerializedName("flag")
@Expose
public String flag;
protected String flag;

@SerializedName("comment")
@Expose
public String comment;
protected String comment;

@SerializedName("user_id")
@Expose
public Long userId;
protected Long userId;

/**
* 同意申请
Expand Down

0 comments on commit abd7c9b

Please sign in to comment.