feat: add channel tag to subscription response in RPCView.list_channels
Include the channel's tag field when building the subscription list response, fetching the full channel object to populate the new "tag" key alongside existing name, uid, and permission fields.
This commit is contained in:
@@ -83,9 +83,11 @@ class RPCView(BaseView):
|
||||
self._require_login()
|
||||
channels = []
|
||||
async for subscription in self.services.channel_member.find(user_uid=self.user_uid, is_banned=False):
|
||||
channel = await self.services.channel.get(uid=subscription['uid'])
|
||||
channels.append({
|
||||
"name": subscription["label"],
|
||||
"uid": subscription["channel_uid"],
|
||||
"tag": channel["tag"],
|
||||
"is_moderator": subscription["is_moderator"],
|
||||
"is_read_only": subscription["is_read_only"]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user