1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

Merge pull request #249 from vanitasvitae/checkHint

Avoid adding multiple storage hints to a message
This commit is contained in:
Florian Schmaus 2018-07-04 14:19:06 +02:00 committed by GitHub
commit 0ffc29aa67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -56,6 +56,6 @@ public final class NoCopyHint extends MessageProcessingHint {
}
public static void set(Message message) {
message.addExtension(INSTANCE);
message.overrideExtension(INSTANCE);
}
}

View file

@ -60,7 +60,7 @@ public final class NoPermanentStoreHint extends MessageProcessingHint {
// No need to set the no-permanent-store hint when a no-store hint is already set.
return;
}
setExplicitly(message);
message.overrideExtension(INSTANCE);
}
public static void setExplicitly(Message message) {

View file

@ -56,6 +56,6 @@ public final class NoStoreHint extends MessageProcessingHint {
}
public static void set(Message message) {
message.addExtension(INSTANCE);
message.overrideExtension(INSTANCE);
}
}

View file

@ -56,6 +56,6 @@ public final class StoreHint extends MessageProcessingHint {
}
public static void set(Message message) {
message.addExtension(INSTANCE);
message.overrideExtension(INSTANCE);
}
}