feat(service): Set isMedia to false when retracting
This commit is contained in:
parent
7de0b1c00e
commit
6e3ab111f3
@ -399,6 +399,7 @@ class DatabaseService {
|
||||
Object? body = notSpecified,
|
||||
Object? mediaUrl = notSpecified,
|
||||
Object? mediaType = notSpecified,
|
||||
bool? isMedia,
|
||||
bool? received,
|
||||
bool? displayed,
|
||||
bool? acked,
|
||||
@ -432,6 +433,9 @@ class DatabaseService {
|
||||
if (mediaType != notSpecified) {
|
||||
m['mediaType'] = mediaType as String?;
|
||||
}
|
||||
if (isMedia != null) {
|
||||
m['isMedia'] = boolToInt(isMedia);
|
||||
}
|
||||
if (received != null) {
|
||||
m['received'] = boolToInt(received);
|
||||
}
|
||||
|
@ -604,6 +604,7 @@ Future<void> performMessageRetraction(RetractMessageComment command, { dynamic e
|
||||
// Update the database
|
||||
final retractedMessage = await GetIt.I.get<MessageService>().updateMessage(
|
||||
msg.id,
|
||||
isMedia: false,
|
||||
mediaUrl: null,
|
||||
mediaType: null,
|
||||
warningType: null,
|
||||
|
@ -124,6 +124,7 @@ class MessageService {
|
||||
Object? body = notSpecified,
|
||||
Object? mediaUrl = notSpecified,
|
||||
Object? mediaType = notSpecified,
|
||||
bool? isMedia,
|
||||
bool? received,
|
||||
bool? displayed,
|
||||
bool? acked,
|
||||
@ -166,6 +167,7 @@ class MessageService {
|
||||
originId: originId,
|
||||
sid: sid,
|
||||
isRetracted: isRetracted,
|
||||
isMedia: isMedia,
|
||||
);
|
||||
|
||||
if (_messageCache.containsKey(newMessage.conversationJid)) {
|
||||
|
@ -772,6 +772,7 @@ class XmppService {
|
||||
|
||||
final retractedMessage = await GetIt.I.get<MessageService>().updateMessage(
|
||||
msg.id,
|
||||
isMedia: false,
|
||||
mediaUrl: null,
|
||||
mediaType: null,
|
||||
warningType: null,
|
||||
|
Loading…
Reference in New Issue
Block a user