Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
90230651e6 |
|||
|
92b88e46ac |
2 changed files with 14 additions and 6 deletions
|
|
@ -121,9 +121,16 @@ class RoomChatController extends AsyncNotifier<IList<Event>?> {
|
||||||
required RelationType relationType,
|
required RelationType relationType,
|
||||||
Event? relation,
|
Event? relation,
|
||||||
}) async {
|
}) async {
|
||||||
final attachment = ref.watch(AttachmentController.provider(roomId));
|
Content? baseContent;
|
||||||
|
if (relationType == .edit) {
|
||||||
|
baseContent = relation?.content;
|
||||||
|
} else {
|
||||||
|
final attachment = ref.watch(AttachmentController.provider(roomId));
|
||||||
|
if (attachment != null && attachment.$2 == null) return;
|
||||||
|
|
||||||
if (attachment != null && attachment.$2 == null) return;
|
baseContent = attachment?.$2;
|
||||||
|
ref.invalidate(AttachmentController.provider(roomId));
|
||||||
|
}
|
||||||
|
|
||||||
var taggedMessage = text;
|
var taggedMessage = text;
|
||||||
|
|
||||||
|
|
@ -141,7 +148,7 @@ class RoomChatController extends AsyncNotifier<IList<Event>?> {
|
||||||
final event = await client.sendMessage(
|
final event = await client.sendMessage(
|
||||||
SendMessageRequest(
|
SendMessageRequest(
|
||||||
roomId: roomId,
|
roomId: roomId,
|
||||||
baseContent: attachment?.$2,
|
baseContent: baseContent,
|
||||||
mentions: Mentions(
|
mentions: Mentions(
|
||||||
userIds: [
|
userIds: [
|
||||||
if (shouldMention == true &&
|
if (shouldMention == true &&
|
||||||
|
|
@ -158,8 +165,6 @@ class RoomChatController extends AsyncNotifier<IList<Event>?> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
ref.invalidate(AttachmentController.provider(roomId));
|
|
||||||
|
|
||||||
ref
|
ref
|
||||||
.watch(RoomsController.provider.notifier)
|
.watch(RoomsController.provider.notifier)
|
||||||
.update(
|
.update(
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@ abstract class OAuthRegisterClientRequest with _$OAuthRegisterClientRequest {
|
||||||
IList<GrantType>? grantTypes,
|
IList<GrantType>? grantTypes,
|
||||||
IList<Uri>? redirectUris,
|
IList<Uri>? redirectUris,
|
||||||
IList<ResponseType>? responseTypes,
|
IList<ResponseType>? responseTypes,
|
||||||
|
|
||||||
|
@Default(AuthMethod.none)
|
||||||
|
@JsonKey(name: "token_endpoint_auth_method")
|
||||||
AuthMethod? authMethod,
|
AuthMethod? authMethod,
|
||||||
}) = _OAuthRegisterClientRequest;
|
}) = _OAuthRegisterClientRequest;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue