Skip to content

Commit

Permalink
feat: Sent UNIX timestamp in ms for raisedHand
Browse files Browse the repository at this point in the history
  • Loading branch information
horymury committed Oct 14, 2021
1 parent e933df5 commit 188dd79
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main/java/org/jitsi/jigasi/AudioModeration.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,10 @@ public boolean requestAudioMuteByJicofo(boolean bMuted)
((ChatRoomJabberImpl) mucRoom).removePresencePacketExtensions(lowerHandExtension);
}

long timeMillis = new Date().getTime();

// let's raise hand
jitsiMeetTools.sendPresenceExtension(mucRoom, new RaiseHandExtension().setRaisedHandValue(true));
jitsiMeetTools.sendPresenceExtension(mucRoom, new RaiseHandExtension().setRaisedHandValue(timeMillis));

return false;
}
Expand Down Expand Up @@ -581,14 +583,13 @@ public RaiseHandExtension()
}

/**
* Sets user's audio muted status.
* Sets user's raised hand status.
*
* @param value <tt>true</tt> or <tt>false</tt> which indicates audio
* muted status of the user.
* @param value the UNIX timestamp in miliseconds or null.
*/
public ExtensionElement setRaisedHandValue(Boolean value)
public ExtensionElement setRaisedHandValue(long value)
{
setText(value ? value.toString() : null);
setText(value == null ? "0" : Long.toString(value));

return this;
}
Expand Down

0 comments on commit 188dd79

Please sign in to comment.