'Return the nickname of the MUC user that sent the message.
Read-only stanza interface.'

def get_mucnick(self):

    if (self['type'] == 'groupchat'):
        return self['from'].resource
    else:
        return ''
