BaileysEx.Feature.Privacy (baileys_ex v0.1.0-alpha.9)

Copy Markdown View Source

Privacy-setting queries aligned with Baileys chats.ts.

Summary

Functions

Fetch the full account blocklist.

Fetch disappearing durations for one or more JIDs via USync.

Fetch privacy settings from the server, or return cached settings when a store is supplied and force is false.

Set the account default disappearing-message duration in seconds.

Disable or enable server-side link-preview generation via the Baileys app-state patch path.

Functions

fetch_blocklist(queryable, opts \\ [])

@spec fetch_blocklist(
  term(),
  keyword()
) :: {:ok, [String.t()]} | {:error, term()}

Fetch the full account blocklist.

fetch_disappearing_duration(queryable, jids, opts \\ [])

@spec fetch_disappearing_duration(term(), [String.t()], keyword()) ::
  {:ok, [map()]} | {:error, term()}

Fetch disappearing durations for one or more JIDs via USync.

fetch_settings(queryable)

@spec fetch_settings(term()) :: {:ok, map()} | {:error, term()}

Fetch privacy settings from the server, or return cached settings when a store is supplied and force is false.

update_block_status(queryable, jid, action, opts \\ [])

@spec update_block_status(term(), String.t(), :block | :unblock, keyword()) ::
  {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}

Block or unblock a user.

update_call_add(queryable, value, opts \\ [])

@spec update_call_add(term(), atom() | String.t(), keyword()) ::
  {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}

Who can add you to calls.

update_default_disappearing_mode(queryable, duration, opts \\ [])

@spec update_default_disappearing_mode(term(), non_neg_integer(), keyword()) ::
  {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}

Set the account default disappearing-message duration in seconds.

update_group_add(queryable, value, opts \\ [])

@spec update_group_add(term(), atom() | String.t(), keyword()) ::
  {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}

Who can add you to groups.

update_last_seen(queryable, value, opts \\ [])

@spec update_last_seen(term(), atom() | String.t(), keyword()) ::
  {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}

Who can see your last seen.

update_messages(queryable, value, opts \\ [])

@spec update_messages(term(), atom() | String.t(), keyword()) ::
  {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}

Who can message you.

update_online(queryable, value, opts \\ [])

@spec update_online(term(), atom() | String.t(), keyword()) ::
  {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}

Online status visibility.

update_profile_picture(queryable, value, opts \\ [])

@spec update_profile_picture(term(), atom() | String.t(), keyword()) ::
  {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}

Profile-picture visibility.

update_read_receipts(queryable, value, opts \\ [])

@spec update_read_receipts(term(), atom() | String.t(), keyword()) ::
  {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}

Read-receipt visibility.

update_status(queryable, value, opts \\ [])

@spec update_status(term(), atom() | String.t(), keyword()) ::
  {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}

Status/story visibility.