mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-21 07:20:09 +00:00
Display group actions and correctly handle group delivery.
This commit is contained in:
@@ -4,6 +4,8 @@ import org.whispersystems.textsecure.util.Hex;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.GroupContext;
|
||||
|
||||
public class GroupUtil {
|
||||
|
||||
private static final String ENCODED_GROUP_PREFIX = "__textsecure_group__!";
|
||||
@@ -24,4 +26,15 @@ public class GroupUtil {
|
||||
return groupId.startsWith(ENCODED_GROUP_PREFIX);
|
||||
}
|
||||
|
||||
public static String getActionArgument(GroupContext group) {
|
||||
if (group.getType().equals(GroupContext.Type.CREATE) ||
|
||||
group.getType().equals(GroupContext.Type.ADD))
|
||||
{
|
||||
return org.whispersystems.textsecure.util.Util.join(group.getMembersList(), ",");
|
||||
} else if (group.getType().equals(GroupContext.Type.MODIFY)) {
|
||||
return group.getName();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user