Skip to content

Commit 82b9185

Browse files
authored
Merge pull request #746 from LLOneBot/dev
chore: update version to 7.12.6
2 parents 6e20d6e + 553beef commit 82b9185

5 files changed

Lines changed: 48 additions & 34 deletions

File tree

doc/更新日志.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
V7.12.6
2+
更新时间 2026-04-28
3+
4+
* OneBot 修复 _get_group_notice API 获取不到发给新成员的公告
5+
* OneBot 支持 _get_group_notice API 获取群公告是否置顶
6+
7+
=================
18
V7.12.5
29
更新时间 2026-04-27
310

package-dist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"llonebot-dist","version":"7.12.5","type":"module","description":"","main":"llbot.js","author":"linyuchen","repository":{"type":"git","url":"https://github.com/LLOneBot/LuckyLilliaBot"}}
1+
{"name":"llonebot-dist","version":"7.12.6","type":"module","description":"","main":"llbot.js","author":"linyuchen","repository":{"type":"git","url":"https://github.com/LLOneBot/LuckyLilliaBot"}}

src/ntqqapi/types/group.ts

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -156,41 +156,43 @@ export interface GroupAllInfo {
156156
isAllowModifyConfGroupName: number
157157
}
158158

159+
interface GroupBulletinFeed {
160+
uin: string
161+
feedId: string
162+
publishTime: string
163+
msg: {
164+
text: string
165+
textFace: string
166+
pics: {
167+
id: string
168+
width: number
169+
height: number
170+
}[]
171+
title: string
172+
}
173+
type: number
174+
fn: number
175+
cn: number
176+
vn: number
177+
settings: {
178+
isShowEditCard: number
179+
remindTs: number
180+
tipWindowType: number
181+
confirmRequired: number
182+
}
183+
pinned: number
184+
readNum: number
185+
is_read: number
186+
is_all_confirm: number
187+
}
188+
159189
export interface GroupBulletinListResult {
160190
groupCode: string
161191
srvCode: number
162192
readOnly: number
163193
role: number
164-
inst: unknown[]
165-
feeds: {
166-
uin: string
167-
feedId: string
168-
publishTime: string
169-
msg: {
170-
text: string
171-
textFace: string
172-
pics: {
173-
id: string
174-
width: number
175-
height: number
176-
}[]
177-
title: string
178-
}
179-
type: number
180-
fn: number
181-
cn: number
182-
vn: number
183-
settings: {
184-
isShowEditCard: number
185-
remindTs: number
186-
tipWindowType: number
187-
confirmRequired: number
188-
}
189-
pinned: number
190-
readNum: number
191-
is_read: number
192-
is_all_confirm: number
193-
}[]
194+
inst: GroupBulletinFeed[]
195+
feeds: GroupBulletinFeed[]
194196
groupInfo: {
195197
groupCode: string
196198
classId: number

src/onebot11/action/go-cqhttp/GetGroupNotice.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ interface Notice {
2121
is_show_edit_card: boolean
2222
tip_window: boolean
2323
confirm_required: boolean
24+
pinned: boolean
2425
}
2526
}
2627

@@ -33,7 +34,7 @@ export class GetGroupNotice extends BaseAction<Payload, Notice[]> {
3334
protected async _handle(payload: Payload) {
3435
const data = await this.ctx.ntGroupApi.getGroupBulletinList(payload.group_id.toString())
3536
const result: Notice[] = []
36-
for (const feed of data.feeds) {
37+
for (const feed of [...data.feeds, ...data.inst]) {
3738
result.push({
3839
notice_id: feed.feedId,
3940
sender_id: +feed.uin,
@@ -51,10 +52,14 @@ export class GetGroupNotice extends BaseAction<Payload, Notice[]> {
5152
settings: {
5253
is_show_edit_card: !!feed.settings.isShowEditCard,
5354
tip_window: !feed.settings.tipWindowType,
54-
confirm_required: !!feed.settings.confirmRequired
55+
confirm_required: !!feed.settings.confirmRequired,
56+
pinned: !!feed.pinned
5557
}
5658
})
5759
}
60+
if (data.inst.length > 0) {
61+
return result.sort((a, b) => b.publish_time - a.publish_time)
62+
}
5863
return result
5964
}
6065
}

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version = '7.12.5'
1+
export const version = '7.12.6'

0 commit comments

Comments
 (0)