mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 13:16:21 +00:00
Make muc_nick return a const char* const
In the documentation of the `muc_nick` function we can read: > The nickname is owned by the chat room and should not be modified or freed We should reflect that in the return type and `strdup` the value for the plugin API. Fixes: https://github.com/profanity-im/profanity/issues/2013
This commit is contained in:
@@ -778,7 +778,7 @@ ui_room_join(const char* const roomjid, gboolean focus)
|
||||
}
|
||||
ProfWin* window = (ProfWin*)mucwin;
|
||||
|
||||
char* nick = muc_nick(roomjid);
|
||||
const char* const nick = muc_nick(roomjid);
|
||||
win_print(window, THEME_ROOMINFO, "!", "-> You have joined the room as %s", nick);
|
||||
if (prefs_get_boolean(PREF_MUC_PRIVILEGES)) {
|
||||
char* role = muc_role_str(roomjid);
|
||||
|
||||
Reference in New Issue
Block a user