Merge pull request #33 from duckietm/Group_Forum

Group forum
This commit is contained in:
DuckieTM
2026-03-29 15:02:56 +02:00
committed by GitHub
4 changed files with 20 additions and 4 deletions
@@ -65,8 +65,8 @@ export class OutgoingHeader
public static GROUP_CREATE_OPTIONS = 798;
public static GROUP_FAVORITE = 3549;
public static GET_FORUM_STATS = 3149;
public static GET_FORUM_THREADS = 873;
public static GET_FORUMS_LIST = 436;
public static GET_FORUM_THREADS = 436;
public static GET_FORUMS_LIST = 873;
public static GET_FORUM_MESSAGES = 232;
public static GET_FORUM_THREAD = 3900;
public static GET_UNREAD_FORUMS_COUNT = 2908;
@@ -4,9 +4,9 @@ export class GroupSavePreferencesComposer implements IMessageComposer<Constructo
{
private _data: ConstructorParameters<typeof GroupSavePreferencesComposer>;
constructor(groupId: number, state: number, onlyAdminCanDecorate: number)
constructor(groupId: number, state: number, onlyAdminCanDecorate: number, forumEnabled: boolean)
{
this._data = [groupId, state, onlyAdminCanDecorate];
this._data = [groupId, state, onlyAdminCanDecorate, forumEnabled];
}
public getMessageArray()
@@ -19,6 +19,7 @@ export class GroupInformationParser implements IMessageParser
private _flag: boolean;
private _canMembersDecorate: boolean;
private _pendingRequestsCount: number;
private _hasForum: boolean;
public flush(): boolean
{
@@ -39,6 +40,7 @@ export class GroupInformationParser implements IMessageParser
this._flag = false;
this._canMembersDecorate = false;
this._pendingRequestsCount = 0;
this._hasForum = false;
return true;
}
@@ -65,6 +67,7 @@ export class GroupInformationParser implements IMessageParser
this._flag = wrapper.readBoolean();
this._canMembersDecorate = wrapper.readBoolean();
this._pendingRequestsCount = wrapper.readInt();
this._hasForum = wrapper.readBoolean();
return true;
}
@@ -153,4 +156,9 @@ export class GroupInformationParser implements IMessageParser
{
return this._pendingRequestsCount;
}
public get hasForum(): boolean
{
return this._hasForum;
}
}
@@ -15,6 +15,7 @@ export class GroupSettingsParser implements IMessageParser
private _badgeParts: Map<number, GroupDataBadgePart>;
private _badgeCode: string;
private _membersCount: number;
private _hasForum: boolean;
public flush(): boolean
{
@@ -30,6 +31,7 @@ export class GroupSettingsParser implements IMessageParser
this._badgeParts = new Map();
this._badgeCode = null;
this._membersCount = 0;
this._hasForum = false;
return true;
}
@@ -83,6 +85,7 @@ export class GroupSettingsParser implements IMessageParser
this._badgeCode = wrapper.readString();
this._membersCount = wrapper.readInt();
this._hasForum = wrapper.readBoolean();
return true;
}
@@ -146,4 +149,9 @@ export class GroupSettingsParser implements IMessageParser
{
return this._membersCount;
}
public get hasForum(): boolean
{
return this._hasForum;
}
}