Skip to content

Commit

Permalink
Fix ban user
Browse files Browse the repository at this point in the history
  • Loading branch information
n9lsjr committed Nov 12, 2024
1 parent 62073b8 commit d77f403
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/backend/swarm.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ const check_data_message = async (data, connection, topic) => {

if ('type' in data) {
if (data.type === "ban") {
if (data.address === Hugin.address) {
if ((data.address === Hugin.address) && con.admin) {
Hugin.send('banned', active.key)
end_swarm(active.key)
removeRoom(active.key)
Expand Down Expand Up @@ -422,15 +422,13 @@ const send_joined_message = async (topic, dht_keys) => {
const [isAdmin, adminkeys] = is_room_admin(active.key)
const [idSig, idPub] = sign_joined_message(dht_keys)
if (isAdmin) {
//We got an adminkey for this room
//Sign our joined message with this
sig = sign_admin_message(dht_keys, active.key, adminkeys)
}
// const sig = await signMessage(dht_keys.get().publicKey.toString('hex'), keychain.getXKRKeypair().privateSpendKey)

let [voice, video, audioMute, videoMute, screenshare] = get_local_voice_status(topic)
if (video) voice = true
//const channels = await get_my_channels(key)

const data = JSON.stringify({
address: Hugin.address,
Expand Down

0 comments on commit d77f403

Please sign in to comment.