Skip to content

Commit

Permalink
Merge pull request #41 from wireapp/staging
Browse files Browse the repository at this point in the history
Add calling
  • Loading branch information
dkovacevic authored Feb 19, 2021
2 parents d191a65 + 62c50ab commit e1ef393
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/main/java/com/wire/bots/roman/Sender.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,14 @@ private UUID send(IncomingMessage message, WireClient client) throws Exception {
if (message.poll.type.equals("confirmation")) {
return sendPollConfirmation(message, client);
}
break;
}
case "call": {
final String content = "{\"version\":\"3.0\",\"type\":\"GROUPSTART\",\"sessid\":\"\",\"resp\":false}";
final Calling calling = new Calling(content);
client.send(calling);
return calling.getMessageId();
}
break;
}

return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@JsonInclude(JsonInclude.Include.NON_NULL)
public class IncomingMessage {
@NotNull
@OneOf(value = {"text", "attachment", "poll"})
@OneOf(value = {"text", "attachment", "poll", "call"})
@JsonProperty
public String type;

Expand Down

0 comments on commit e1ef393

Please sign in to comment.