Compare commits

...
Author SHA1 Message Date
90230651e6
default auth method to none
Fixes auth on MAS
2026-07-26 18:26:20 -04:00
92b88e46ac
fix attachments disappearing when editing messages 2026-07-26 17:21:01 -04:00
2 changed files with 14 additions and 6 deletions

View file

@ -121,10 +121,17 @@ class RoomChatController extends AsyncNotifier<IList<Event>?> {
required RelationType relationType,
Event? relation,
}) async {
Content? baseContent;
if (relationType == .edit) {
baseContent = relation?.content;
} else {
final attachment = ref.watch(AttachmentController.provider(roomId));
if (attachment != null && attachment.$2 == null) return;
baseContent = attachment?.$2;
ref.invalidate(AttachmentController.provider(roomId));
}
var taggedMessage = text;
for (final tag in tags) {
@ -141,7 +148,7 @@ class RoomChatController extends AsyncNotifier<IList<Event>?> {
final event = await client.sendMessage(
SendMessageRequest(
roomId: roomId,
baseContent: attachment?.$2,
baseContent: baseContent,
mentions: Mentions(
userIds: [
if (shouldMention == true &&
@ -158,8 +165,6 @@ class RoomChatController extends AsyncNotifier<IList<Event>?> {
),
);
ref.invalidate(AttachmentController.provider(roomId));
ref
.watch(RoomsController.provider.notifier)
.update(

View file

@ -16,6 +16,9 @@ abstract class OAuthRegisterClientRequest with _$OAuthRegisterClientRequest {
IList<GrantType>? grantTypes,
IList<Uri>? redirectUris,
IList<ResponseType>? responseTypes,
@Default(AuthMethod.none)
@JsonKey(name: "token_endpoint_auth_method")
AuthMethod? authMethod,
}) = _OAuthRegisterClientRequest;