Namespace: bookmarks

jsxc.xmpp. bookmarks

Load and save bookmarks according to XEP-0048.
Source:

Methods

<static> add(room, alias, nick, autojoin)

Adds or overwrites bookmark for given room.
Parameters:
Name Type Description
room string room jid
alias string room alias
nick string preferred user nickname
autojoin boolean should we join this room after login?
Source:

<private, static> addToLocal(room, alias, nick, autojoin)

Adds or overwrites bookmark for given room in local storage.
Parameters:
Name Type Description
room string room jid
alias string room alias
nick string preferred user nickname
autojoin boolean should we join this room after login?
Source:

<private, static> addToRemote(room, alias, nick, autojoin)

Adds or overwrites bookmark for given room in remote storage.
Parameters:
Name Type Description
room string room jid
alias string room alias
nick string preferred user nickname
autojoin boolean should we join this room after login?
Source:

<static> delete(room, soft)

Deletes the bookmark for the given room and removes it from the roster if soft is false.
Parameters:
Name Type Argument Default Description
room string room jid
soft boolean <optional>
false True: leave room in roster
Source:

<private, static> deleteFromLocal(room, soft)

Delete bookmark from local storage.
Parameters:
Name Type Argument Default Description
room string room jid
soft boolean <optional>
false True: leave room in roster
Source:

<private, static> deleteFromRemote(room, soft)

Delete bookmark from remote storage.
Parameters:
Name Type Argument Default Description
room string room jid
soft boolean <optional>
false True: leave room in roster
Source:

<static> load()

Load bookmarks from pubsub.
Source:

<private, static> loadFromLocal()

Load bookmarks from local storage.
Source:

<private, static> loadFromRemote()

Load bookmarks from remote storage.
Source:

<static> parseErr(stanza) → {object}

Parse received error.
Parameters:
Name Type Description
stanza string
Source:
Returns:
  • err - The parsed error
    Type
    object
  • err.type - XMPP error type
    Type
    string
  • err.reasons - Array of error reasons
    Type
    array

<static> remote() → {boolean}

Determines if server is able to store bookmarks.
Source:
Returns:
True: Server supports bookmark storage
Type
boolean

<static> showDialog(room)

Show dialog to edit bookmark.
Parameters:
Name Type Description
room string room jid
Source: