a bit of work on the message page

This commit is contained in:
2024-06-07 23:44:32 +02:00
parent 549311535c
commit 95d51c82e9
5 changed files with 240 additions and 21 deletions

View File

@@ -182,6 +182,16 @@ class APIClient {
);
}
static Future<ChannelWithSubscription> getChannel(TokenSource auth, String cid) async {
return await _request(
name: 'getChannel',
method: 'GET',
relURL: 'users/${auth.getUserID()}/channels/${cid}',
fn: ChannelWithSubscription.fromJson,
authToken: auth.getToken(),
);
}
static Future<(String, List<Message>)> getMessageList(TokenSource auth, String pageToken, {int? pageSize, List<String>? channelIDs}) async {
return await _request(
name: 'getMessageList',

View File

@@ -1,6 +1,6 @@
class APIException implements Exception {
final int httpStatus;
final String error;
final int error;
final String errHighlight;
final String message;