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