aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api/activity/helpers
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-08-22 14:52:40 +0300
committerGravatar Vitaly Takmazov2021-08-22 14:52:40 +0300
commitf7ebc8831b032196e6695fa22647717a7bf2b55c (patch)
treebb05cc5aba7595de6f1f90fc7c2f558e28196239 /src/main/java/com/juick/www/api/activity/helpers
parentd918967281652ead0130c5dbef663e82003d4393 (diff)
ActivityPub: fix empty object serialization
Diffstat (limited to 'src/main/java/com/juick/www/api/activity/helpers')
-rw-r--r--src/main/java/com/juick/www/api/activity/helpers/ContextTypeFilter.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/com/juick/www/api/activity/helpers/ContextTypeFilter.java b/src/main/java/com/juick/www/api/activity/helpers/ContextTypeFilter.java
new file mode 100644
index 00000000..e8a1dfab
--- /dev/null
+++ b/src/main/java/com/juick/www/api/activity/helpers/ContextTypeFilter.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2008-2021, Juick
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package com.juick.www.api.activity.helpers;
+
+public class ContextTypeFilter {
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null || !(obj instanceof String)) {
+ return true;
+ }
+ return ((String)obj).equals("Context");
+ }
+}