Compare commits

..
Author SHA1 Message Date
81ba35d9d7
add wip deregistering 2026-09-09 15:41:57 -04:00
a1a03f94ce
smarter notif logic 2026-09-09 15:41:57 -04:00
ea5c38f892
include avatars on notifs 2026-09-09 15:41:57 -04:00
b3a4eb07b7
send notifications natively 2026-09-09 15:41:57 -04:00
5bfc415468
override webcrypto deps 2026-09-09 15:41:57 -04:00
7b93cf4d12
pass pushes to gomuks 2026-09-09 15:41:57 -04:00
ad93769d14
working registration 2026-09-09 15:41:57 -04:00
842b232a46
slight cleanup
`onNewEndpoint` is still not getting called for some reason (help appreciated)
2026-09-09 15:41:57 -04:00
08eddc612f
add UnifiedPushAllowedController 2026-09-09 15:41:57 -04:00
a3981fdbd1
support for registering pushers 2026-09-09 15:41:57 -04:00
da352cd035
cap max length of embeds 2026-09-09 15:37:41 -04:00
0201f71e5d
allow banning left users 2026-09-09 15:26:04 -04:00
4314c88d5c
fallback to empty profile if fetch fails 2026-09-09 15:25:10 -04:00
5 changed files with 37 additions and 27 deletions

2
gomuks

@ -1 +1 @@
Subproject commit 6c8b2781e02f27b64f37735cba6634784f117b88 Subproject commit 0e06c7b74f96d3e29a8101893ca1921d13a90573

View file

@ -281,8 +281,13 @@ class ClientController extends AsyncNotifier<int> {
Future<Paginate> paginate(PaginateRequest request) async => Future<Paginate> paginate(PaginateRequest request) async =>
.fromJson(await _sendCommand("paginate", request.toJson())); .fromJson(await _sendCommand("paginate", request.toJson()));
Future<ProfileResponse> getProfile(String userId) async => Future<ProfileResponse> getProfile(String userId) async {
.fromJson(await _sendCommand("get_profile", {"user_id": userId})); try {
return .fromJson(await _sendCommand("get_profile", {"user_id": userId}));
} catch (_) {
return ProfileResponse(profile: .new(id: userId));
}
}
Future<void> reportEvent(ReportRequest request) => Future<void> reportEvent(ReportRequest request) =>
_sendCommand("report_event", request.toJson()); _sendCommand("report_event", request.toJson());

View file

@ -9,7 +9,7 @@ part "profile_response.g.dart";
@JsonSerializable() @JsonSerializable()
class const ProfileResponse({ class const ProfileResponse({
@JsonKey(fromJson: Profile.fromJson) required final Profile profile, @JsonKey(fromJson: Profile.fromJson) required final Profile profile,
required final Bio? bio, final Bio? bio,
}) with _$ProfileResponse { }) with _$ProfileResponse {
Map<String, Object?> toJson() => _$ProfileResponseToJson(this); Map<String, Object?> toJson() => _$ProfileResponseToJson(this);

View file

@ -31,9 +31,15 @@ class const UrlPreview(final Uri link, {super.key}) extends ConsumerWidget {
Text( Text(
preview.title!, preview.title!,
style: Theme.of(context).textTheme.titleLarge, style: Theme.of(context).textTheme.titleLarge,
maxLines: 3,
overflow: .ellipsis,
), ),
if (preview.description != null) ...[ if (preview.description != null) ...[
Text(preview.description!), Text(
preview.description!,
maxLines: 20,
overflow: .ellipsis,
),
SizedBox(height: 4), SizedBox(height: 4),
], ],
if (preview.imageUrl != null) if (preview.imageUrl != null)

View file

@ -207,15 +207,14 @@ final class const UserBottomSheet(
targetUser: userId, targetUser: userId,
), ),
), ),
) && ))
member.status == .join ||
member.status == .invite)
Padding( Padding(
padding: .only(top: 4), padding: .only(top: 4),
child: Row( child: Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
spacing: 8, spacing: 8,
children: [ children: [
if (member.status == .join || member.status == .invite)
M3EButton.icon( M3EButton.icon(
onPressed: () => showMembershipDialog(.kick), onPressed: () => showMembershipDialog(.kick),
shape: .square, shape: .square,