Add plugin prof_get_nick_from_roster function

This commit is contained in:
Dustin Lagoy
2021-04-28 09:17:02 -04:00
parent 4a94c051a4
commit ed4d2fcfb2
10 changed files with 80 additions and 0 deletions

View File

@@ -138,6 +138,12 @@ Retrieve the users nickname in a chat room, when in a chat room window.
*/
char* prof_get_current_nick(void);
/**
Retrieve the nickname for a given barejid if it is in the roster.
@return the users nickname e.g. "eddie", or NULLL if the barejid is not in the roster.
*/
char* prof_get_nick_from_roster(const char *barejid);
/**
Retrieve nicknames of all occupants in a chat room, when in a chat room window.
@return nicknames of all occupants in the current room or an empty list if not in a chat room window.

View File

@@ -253,6 +253,15 @@ def get_current_nick():
pass
def get_nick_from_roster(barejid):
"""Retrieve a nickname from a barejid if it is in the roster.
:return: the users nickname e.g. ``"eddie"``, or ``None`` if the barejid is not in the roster.
:rtype: str
"""
pass
def get_current_occupants():
"""Retrieve nicknames of all occupants in a chat room, when in a chat room window.